我尝试定义非静态全局变量。
Option Explicit
Const BT = Range("b11")
ReDim IT(Range("B11")) As String
ReDim ST(Range("B11")) As Double
或
Option Explicit
Const BT = Range("b11")
ReDim IT(BT) As String
ReDim ST(BT) As Double
但是这不起作用。有办法吗?
谢谢
您将必须这样做
Option Explicit
Dim IT() As String
Dim ST() As Double
Dim BT As Range
Sub SetUp()
Set BT = Range("B11")
ReDim IT(BT.Value2)
ReDim ST(BT.Value2)
End Sub
然后执行其他操作之前先致电安装程序