First of all you can use the instr function for searching a string, although I believe that the function:
mid(StringName,len(stringName-1),1)
that will give you the last char will be more helpful for you..
I think we're misunderstanding his problem!
All of these are functions. However, they all need to assign there returned value to a pre-declared variable.
If you haven't defined a variable then you'd get the error
warning. As assuming you're searching the last character of str_input, try:
Dim str_return As String
str_return = Right(str_input, "\", 1)
If (str_return = "\" Then
<Do something.>
Else
<Do something else.>
End If
If Right(strInput,1) = "/" Then
<Do something>
Else
<Do something else>
End If
If you are looking for the last character of a string, Right() is the function to use. It doesn't need to get any more complicated than that.
BlackburnKL
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.