J
John
I want to compare a character from a string by doing something like
this:
Dim txt As String
txt = "beware"
If txt(0) = "b" Then MsgBox "This Works OK"
How do I access a character from a string? I tried using txt(0) and
txt[0] (as I would in the C language) but got an error.
Also, I'm assuming that the first character of a string is at postion
0 rather than 1 (as it is for an array by default). Is this correct?
this:
Dim txt As String
txt = "beware"
If txt(0) = "b" Then MsgBox "This Works OK"
How do I access a character from a string? I tried using txt(0) and
txt[0] (as I would in the C language) but got an error.
Also, I'm assuming that the first character of a string is at postion
0 rather than 1 (as it is for an array by default). Is this correct?