VBA中如何在标准模块中定义动态数组为全局变量
FunctionloadP()DimPPAsVariantDimintTAsIntegerDimindexAsIntegerReDimarr1(0To10)AsStrin...
Function loadP()
Dim PP As Variant
Dim intT As Integer
Dim index As Integer
ReDim arr1(0 To 10) As String
ReDim arr2(0 To 10) As String
For intT = 0 To 10
If combox.selectedText = arr1(intT) Then
PP = Split(arr2(intT), ",")
For index = 0 To UBound(PP)
Call checkboxlist.addItem(PP(index), "")
Next
End If
Next
End Function
我在标准模块中定义了,然后在loadP方法中调用p方法中的数组为啥没有数据? 展开
Dim PP As Variant
Dim intT As Integer
Dim index As Integer
ReDim arr1(0 To 10) As String
ReDim arr2(0 To 10) As String
For intT = 0 To 10
If combox.selectedText = arr1(intT) Then
PP = Split(arr2(intT), ",")
For index = 0 To UBound(PP)
Call checkboxlist.addItem(PP(index), "")
Next
End If
Next
End Function
我在标准模块中定义了,然后在loadP方法中调用p方法中的数组为啥没有数据? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询