J
Joanne
I stumbled on the split function while I was trying to figure out how to add
a lot of names to an array. It's working fine, as tested by the message box.
Whatever number I enter in the message box brings up the appropriately
indexed text for the array. But if a define the array with a specific number
of elements, like straray Names(5) as string, I get an error that this is not
an array.
Could someone explain?
Thanks as always for your help.
Sub gtAray()
Dim strListNames As String
Dim strNamesAray() As String
strListNames = "Joanne|Rob|Frank|Beth|Jess|Zach"
strNamesAray = Split(strListNames, "|")
MsgBox "The fourth member of the array is " & strNamesAray(3)
End Sub
a lot of names to an array. It's working fine, as tested by the message box.
Whatever number I enter in the message box brings up the appropriately
indexed text for the array. But if a define the array with a specific number
of elements, like straray Names(5) as string, I get an error that this is not
an array.
Could someone explain?
Thanks as always for your help.
Sub gtAray()
Dim strListNames As String
Dim strNamesAray() As String
strListNames = "Joanne|Rob|Frank|Beth|Jess|Zach"
strNamesAray = Split(strListNames, "|")
MsgBox "The fourth member of the array is " & strNamesAray(3)
End Sub