PDA

Click to See Complete Forum and Search --> : EXCEL: How To: Preset Starting Directory for File Picker [Resolved]


Webtest
Jun 2nd, 2005, 07:17 AM
Esteemed Forum Participants and Lurkers:
===============================
EXCEL

How can I preset the starting directory for the VBA File Picker object? I did a search on this forum but I didn't get any hits.

I tried "ChDir", but that doesn't affect the file picker. 'Create a FileDialog object as a File Picker dialog box.
Set fd = Application.FileDialog(msoFileDialogFilePicker)I tried the ".LookIn" property, but that generated an error ... it doesn't apply to the File Picker.

Thank you for your comments, suggestions, and assistance.


THE RESOLUTION IS:
'Set the initial path to the C:\ drive.
fd.InitialFileName = "C:\Test"

It will open the picker to the C:\Test folder.