Hi,
I lost this line of code someone on this forum gave me. I want to strip the last "\" from the line below.
C:\MyDir\MyFile\
Any help appreciated.
Regards,
Alan.
Printable View
Hi,
I lost this line of code someone on this forum gave me. I want to strip the last "\" from the line below.
C:\MyDir\MyFile\
Any help appreciated.
Regards,
Alan.
dim s as string
dim t as string
dim l as long
s = "c:\mydir\myfile\"
l = instrrev(s,"\")
t = mid(s,1,l-1)
t should got "c:\mydir\myfle"
hope this help.
cksiow
http://vblib.virtualave.net - share our codes
YourString = "c:\...\"
if right(YourString,1) = "\" then
YourString = left(YourString,len(YourString)-1)
end if
Iouri Boutchkine
[email protected]