Thread: Return Filename
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jarle Jarle is offline
external usenet poster
 
Posts: 32
Default Return Filename

I did it like this:

s = "C:\Documents and Settings\folder1\folder2\bok2.xls"
s1 = Split(s, "\")
f_name = s1(UBound(s1))


Jarle skrev:

I have the string that includes path and filename:

C:\Documents and Settings\Folder1\Folder2\....\filename

How can I easily load only the filename to the variable f_name?

rgds
Jarle