怎样声明或放置公共数组
Dim brr()是Sub 按钮4_Click()与Function GetB(bstr, c) 的公用数组,必须放在Sub 按钮4_Click()上,请问应该怎样声明或放置,放在Sub 按钮3_Click()后面提示end sub怎样...要求Dim brr()只在Sub 按钮4_Click()+函数中起作用Sub 按钮3_Click()
................
end sub
Dim brr()
Sub 按钮4_Click()
xstep = 21 '每组多少行
ReDim Err(1 To UBound(crr) / xstep + 1, 1 To 2)
For i = 1 To UBound(brr)
b0 = b0 & "," & i
Next
b0 = Mid(b0, 2)
.................
c = crr(i + k, 1)
bstr = GetB(bstr, c)
If Len(bstr) = 0 Then GoTo 100
If Len(bstr) And InStr(bstr, ",") = 0 Then
n = n + 1
'Err(n, 1) = brr(bstr, 1)
............
100: Next i
End Sub
Function GetB(bstr, c)
cc = " " & Mid(c, 5) & " "
bb = Split(bstr, ",")
For Each i In bb
b = brr(i, 1)
xrr = Split(b, " ")
s = 0
..........
If s >= xmin And s <= xmax Then GetB = GetB & "," & i
Next
GetB = Mid(GetB, 2)
End Function
[此贴子已经被作者于2022-11-27 23:13编辑过]