下标越界!在线等
For i = 0 To UBound(a())
提示下标越界,怎么回事?
[解决办法]
For i = 0 To UBound(a())
提示下标越界,怎么回事?
因为数组a还未真正定义过大小。
象这样,就会提示下标越界:
Dim a() As Integer
For i = 0 To UBound(a())
象这样,就不会提示下标越界:
Dim a() As Integer
Redim a(10)
For i = 0 To UBound(a())