Hi Leith and mc84Excel,
Thank you for your contribution. Nevertheless, we are not there yet. I'll explain:
With this code
The resulting Dialog is this:
Attachment 649833
Notice the Folder name field is empty.
When I hit OK, the path is passed to the Folder variable and into the msgbox, so although the selected folder is not displayed in the Folder name field, the output is correct.
To have the folder name reflected in the Folder name field, I have to select "Documents" in the top Path field:
Attachment 649837
Notice now the Folder name field is filled with Documents.
When I hit OK, again the result is correct.
So my question remains, how can I "automate" the "manual selection" of the selected folder to have it displayed in the Folder name field.
(The reason why I want this, is because I have noticed some users get confused when they have to hit the OK button while the Folder name field is still empty…
I think it is not as user-friendly as I like my projects to be.)
For who is interested, I have found another oddity:
When I change the given Path string like this:
Path = Application.DefaultFilePath
The resulting Dialog looks like the perfect solution, but when the user hits the OK button, it gives an error:
Attachment 649842
Bookmarks