|
-
April 2nd, 2001, 11:56 PM
#1
Strip "\" on End
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.
-
April 3rd, 2001, 12:52 AM
#2
Re: Strip "\" on End
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
-
April 3rd, 2001, 07:13 AM
#3
Re: Strip "\" on End
YourString = "c:\...\"
if right(YourString,1) = "\" then
YourString = left(YourString,len(YourString)-1)
end if
Iouri Boutchkine
[email protected]
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
|