View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Get filename only

kaon

You can also use the Dir function

Dir(fname) will return only the file name

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"kaon " wrote in message
...
Dear all,

How can I just return the filename only (i.e without path) as an
absolute path can be returned by:
fName = Application.GetOpenFilename(FileFilter:="All files (*.*),
*.*", _
Title:="Select a file",
MultiSelect:=False)

Thanks.


---
Message posted from http://www.ExcelForum.com/