hi again,
I have FileDialog code that results in the full path ...\folderA\folderB\MyDatabase.accdb
The user needs to browse / file explore to find the correct accdb - - - but what then what is needed to save is only the file name: MyDatabase.accdb
I can string parse that by finding the last "\" symbol
but I was wondering if there was a property in FileDialog method that provided it? ...without the path
have googled about quite a bit but can't seem to zero in on that question....
file Pick - name only not path
-
- Administrator
- Posts: 78540
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: file Pick - name only not path
No, the FileDialog always returns the path + filename. So you'll have to parse the string, or use the Dir function: Dir(path + filename) returns just filename.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 308
- Joined: 24 Dec 2015, 16:41
Re: file Pick - name only not path
Dir() works great! thanks for the tip.