|
-
Aug 13th, 2000, 05:49 PM
#1
Thread Starter
Frenzied Member
Im not sure how but I need the code to
see if char one is a "," ..
Thanks!
-
Aug 13th, 2000, 05:54 PM
#2
Monday Morning Lunatic
Try:
Code:
If Left(Text1.Text, 1) = "," Then
Msgbox "Comma start"
Else
Msgbox "No comma start"
End If
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 06:01 PM
#3
You can also use the Like operator
Code:
If Text1 Like ",*" Then Print "Yes" Else Print "No"
-
Aug 13th, 2000, 06:04 PM
#4
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 06:21 PM
#5
Thread Starter
Frenzied Member
How do you get the last char if you dont know what it is??
-
Aug 13th, 2000, 06:24 PM
#6
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 06:26 PM
#7
-
Aug 13th, 2000, 06:31 PM
#8
Monday Morning Lunatic
Oops...bad function call. Use Right(String, Length).
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 06:34 PM
#9
Oops, sorry, it should be: Right(Txt, 1)
If you want to get the last char.
-
Aug 13th, 2000, 06:51 PM
#10
Parksie: The Like operator is used for pattern matching (using wildcards if necessary).
-
Aug 13th, 2000, 06:54 PM
#11
Monday Morning Lunatic
So can you do stuff like:
to match "0-a", "5-v" and things like that?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 13th, 2000, 07:03 PM
#12
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"
-
Aug 14th, 2000, 01:16 PM
#13
Monday Morning Lunatic
Thanks Megatron, that'll make my life a lot easier .
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|