rs.Open "select id from neirong where title='" & .TextMatrix(.Row, 4) & "'", cn
If Not rs.BOF Then
Dim i As Integer
dim aa as variant
For i = 1 To b
AA(i) = rs("id") '报错 subscript out of range
Next
End If
rs.Close
If Not rs.BOF Then
Dim i As Integer
dim aa as variant
For i = 1 To b
AA(i) = rs("id") '报错 subscript out of range
Next
End If
rs.Close
AA
的定义语句?
If Not rs.BOF Then
Dim i As Integer
dim aa as variant
dim AA()
redim AA(b)
For i = 1 To b
AA(i) = rs("id") '报错 subscript out of range
Next
End If
rs.Close使用数组前要给数组定义大小
redim AA(b) --其中b为数组的大小
改成dim aa() as int试试
redim AA(b) --其中b为数组的大小
顶这个,