Think of an Array as a list with sequential indexes - starting at 0.
Dim arr(2) As String
arr(0) = "a"
arr(1) = "b"
arr2() = "c"
You have to loop through the array to get the values that are stored in
the array:
Dim i As Integer, str1 As String
For i = 0 to Ubound(arr)
str1 = str1 & arr(i) & ", "
Next
MsgBox str1
Now the MsgBox will display all the values in arr.
Note: Ubound is a built-in function that gets the upper value of an
array. I could have just said
For i = 0 to 2
But it is good practice to use Ubound for when you use dynamic arrays
where you don't really know the upper value ahead of time. For dynamic
arrays you increment them using
Redim Preserve. This is all in the help files.
Rich
*** Sent via Developersdex
http://www.developersdex.com ***