循环遍历数组,索引在vba中,并获取特定索引处的元素

时间:2013-04-12 14:47:23

标签: vba ms-access

我现在正在尝试这样的事情

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

1 个答案:

答案 0 :(得分:4)

试试这个:

Dim myAddress() As String
myAddress= Split("4th Street NW Washington, DC")

For intI = 1 To UBound(myAddress)
    Console.WriteLine(myAddress(intI))
Next intI