Hi...
Im pretty sure that this is simple...
But i cant get it !:eek2:
Anyway i want to check if the last character of a textbox is "P"
Can anyone help with that?
Thanks!:):wave:
Printable View
Hi...
Im pretty sure that this is simple...
But i cant get it !:eek2:
Anyway i want to check if the last character of a textbox is "P"
Can anyone help with that?
Thanks!:):wave:
try
if UCASE(right(TRIM(text1.text),1)) = "P" Then ....
VB Code:
If LCase(Right(Text1.Text, 1)) = "p" then MsgBox "Last chr is P" End If
Nope...
Doesnt work... :(
Didnt work either...
Then you are doing something wrong.
Can you post your project?
Here is my example of the project and it works fine.
What is the problem?Quote:
Originally posted by mike2
Didnt work either...
maybe you have a carraige return at the end of your text because trim wont trim with that there, try this.
VB Code:
If Right$(Trim(Replace(Text1.Text, vbCrLf, "")), 1) = "p" Then MsgBox "p is the last char" End If
casey.