J
joyo
I don't know why my split function doesn't work. See the code below.
Dim str As String
Dim substr As String
Dim mArray() As String
Dim mArrayUpper As Integer
Dim mCounter As Integer
str = "This\is\a\test"
mArray = Split(str, "\") 'this line got error message
mArrayUpper = UBound(mArray)
For mCounter = 0 To mArrayUpper
substr = mArray(mCounter)
Next mCounter
I just got the error message, "Run-time error 13, Type mismatch"
Why?
Thanks
joyo
Dim str As String
Dim substr As String
Dim mArray() As String
Dim mArrayUpper As Integer
Dim mCounter As Integer
str = "This\is\a\test"
mArray = Split(str, "\") 'this line got error message
mArrayUpper = UBound(mArray)
For mCounter = 0 To mArrayUpper
substr = mArray(mCounter)
Next mCounter
I just got the error message, "Run-time error 13, Type mismatch"
Why?
Thanks
joyo