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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse for a directory

Status
Not open for further replies.

marcello62

Technical User
Jun 19, 2006
42
NL
Hi there,

I'm using an MS Office FileDialog to browse for and select a file. This works fine. Now I want to let users browse for and select a map in which they can drop an output file. So this functionality should show only maps, not files. Does anyone know how to do this?

Any help will be greatly appreciated, thanks.

 
I'd use the Filters collection of your FileDialog object:
yourFileDialogObject.Filters.Add "Maps", "*.map", 1

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV, MajP,

Actually I came across another solution, which consists of passing the msoFileDialogFolderPicker parameter while initializing the file dialog object:

Dim fDialog As Office.FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)

This also works fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top