你好,我在LotusScript中有如下的二維數組。LotusScript ans二維數組&訂閱輸出或範圍錯誤
Counter = 0
While Not (ProcessingViewDoc Is Nothing)
Redim Preserve AllRecrods(Counter,0)
AllRecrods(Counter,0) = ProcessingViewDoc.Test1(0)
Redim Preserve AllRecrods(Counter,1)
AllRecrods(Counter,1) = ProcessingViewDoc.Test2(0)
Redim Preserve AllRecrods(Counter,2)
Set ProcessingViewDoc = ProcessingView.GetNextDocument(ProcessingViewDoc)
Counter = Counter +1
Wend
當它處理下一個文檔時,它會到達計數器1和第二個文檔,它會使我的錯誤訂閱超出範圍。 這是數組的全局聲明。
Dim AllRecrods() As Variant
下面是第二次循環時出現錯誤的行。
Redim Preserve AllRecrods(Counter,0)
感謝你們倆:) – hdc