0
我有以下代碼:靜態或動態數組
Sub nummm()
Dim num() As String
For x = 2 To 1000
c = 0
ReDim Preserve num(UBound(Split(Cells(x, 7).Value, " ")) + 1)
num = Split(Cells(x, 7).Value, " ")
For Each b In num
c = c + 1
If c = UBound(num) + 1 Then GoTo vv:
Next
vv:
Next
End Sub
它的運行很好,如果我刪除線
If c = UBound(num) + 1 Then GoTo vv:
,但如果它不除,我得到運行時錯誤:「這個數組固定或暫時鎖定「 如何使變量num動態? THX求助
+1出境的:) –