Im not sure how but I need the code to
see if char one is a "," ..
Thanks!
Printable View
Im not sure how but I need the code to
see if char one is a "," ..
Thanks!
Try:
Code:If Left(Text1.Text, 1) = "," Then
Msgbox "Comma start"
Else
Msgbox "No comma start"
End If
You can also use the Like operator
Code:If Text1 Like ",*" Then Print "Yes" Else Print "No"
Say, Megatron, is that Like operator a shortcut for the regexp stuff? Otherwise I'll just go back to the other method shown a while back.
How do you get the last char if you dont know what it is??
What do you mean?
try:
Code:Print Right(Txt)
Oops...bad function call. Use Right(String, Length).
Oops, sorry, it should be: Right(Txt, 1)
If you want to get the last char.
Parksie: The Like operator is used for pattern matching (using wildcards if necessary).
So can you do stuff like:
to match "0-a", "5-v" and things like that?Code:Like "[0-9]-[a-z]"
Yup, 0-9 will restrict to numbers only, but you can also use a pound sign for that.
Code:If Chr(KeyAscii) Like "#" Then Print "Numeric"
Thanks Megatron, that'll make my life a lot easier :D.