Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I find a FILE path with BrowseForFolder?

Status
Not open for further replies.

OmandA

Programmer
Jan 24, 2006
5
CA
Hello! Is there any way to use the Shell.Application function BrowseForFolder (or any other function for that matter) to browse for the path to a FILE as opposed to just a folder?

Here is the Syntax I'm presently using to browse for a FOLDER. I want something similar for finding a string that represents the path to a file.

Dim FolderPath As String
Dim SA As Object, F As Object
Set SA = CreateObject("Shell.Application")
Set F = SA.BrowseForFolder(0, "Choose a folder", _
0, strStartDir)
If (Not F Is Nothing) Then
FolderPath = F.Items.Item.Path
End If

...

Thanks in advance.
 
Have you seen, for example:
File Selecter
thread705-1069347
 
Thanks... I've now reviewed that thread... but it's quite vague in it's references. Could you please give me an example of how to use the Application.FileDialog function?
 
And more from Tek-Tips:
Get File Using File DIalog
thread705-1129229
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top