1
我現在想這樣的事情遍歷VBA索引陣列,並在特定的指數獲得元素
Dim myAddress() As String
myAddress= Split("4th Street NW Washington, DC")
For intI = 1 To UBound(myAddress)
`how can i access myAddress[intI+1] from here?
Next intI
我現在想這樣的事情遍歷VBA索引陣列,並在特定的指數獲得元素
Dim myAddress() As String
myAddress= Split("4th Street NW Washington, DC")
For intI = 1 To UBound(myAddress)
`how can i access myAddress[intI+1] from here?
Next intI
試試這個:
Dim myAddress() As String
myAddress= Split("4th Street NW Washington, DC")
For intI = 1 To UBound(myAddress)
Console.WriteLine(myAddress(intI))
Next intI
感謝,它是循環如何內工作的問題我會訪問+1或下一個元素 – user391986
使用myAddress(intI) – duDE
VBA默認爲0作爲第一個數組元素的索引。 – HansUp