Return file from a path string
If you have xl2000 or later:
sStr = "C:\folder1\folder2\folder3\folder4\folder5\file.x ls"
? Right(sStr,len(sStr)-instrrev(sStr,"\"))
file.xls
demo's from the immediate window.
--
Regards,
Tom Ogilvy
"Steph" wrote in message
...
I have a string variable that is a path to a file:
C:\folder1\folder2\folder3\folder4\folder5\file.xl s
How can I create a new variable that is simply the file name.xls? Thanks!
|