May 25th, 2004, 06:35 AM
#1
Thread Starter
Hyperactive Member
May 25th, 2004, 06:41 AM
#2
Member
try
if UCASE(right(TRIM(text1.text),1)) = "P" Then ....
May 25th, 2004, 06:43 AM
#3
Thread Starter
Hyperactive Member
Nope...
Doesnt work...
May 25th, 2004, 06:43 AM
#4
VB Code:
If LCase(Right(Text1.Text, 1)) = "p" then
MsgBox "Last chr is P"
End If
May 25th, 2004, 06:46 AM
#5
Thread Starter
Hyperactive Member
May 25th, 2004, 06:52 AM
#6
Then you are doing something wrong.
Can you post your project?
Here is my example of the project and it works fine.
Attached Files
May 25th, 2004, 12:29 PM
#7
May 25th, 2004, 03:50 PM
#8
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.
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