LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default How to split filename from filepath?

If I retrieve a filename including the filepath like this:

strFileName = Application.GetOpenFilename("Report (*.txt; *.dat ),*.txt;
*.dat")

How do I manipulate the strFileName, retrieving only the filename?

(guess I have to search from right to find the first "\". Then delete the
content to the left of this character. But I don't know how this works in VBA)

Thanks for suggestions.

Frank
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filename extract from Filepath Text String DaveyC Excel Discussion (Misc queries) 4 December 20th 07 04:04 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 3 July 5th 05 07:56 PM
Function to return filepath given full filename Matt Lawson[_3_] Excel Programming 8 March 3rd 04 02:32 AM
get filename and filepath Robert Ehrlich Excel Programming 3 December 21st 03 12:23 PM
Split fullname into Drive, Path and Filename Michael Göhring Excel Programming 2 December 12th 03 12:56 PM


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"