I've got a string in wich I need to get rid of the last character only if it's a "C" and the string is of variable lenght anybody can help? thanks
Printable View
I've got a string in wich I need to get rid of the last character only if it's a "C" and the string is of variable lenght anybody can help? thanks
Code:if right(mystring,1) = "C" then
mystring = left( mystring,Len(mystring))
end if
VB Code:
if right(mystring,1) = "C" then mystring = left( mystring,Len(mystring)-1) end if
You forgot the -1
Think you missed the -1 off the end