filedialog problem

Z

Zygoid

I have been able to get help in having a module open up a filedialo
window;

Sub OpenFiledialogWindow()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.InitialFileName = "\\greg\greg\bids\"
fd.Show
End Sub

but i cannot figure out how to instruct it to open the file that i
double clicked.

any help would be appreciated. Thanks
 
B

Bernie Deitrick

Zygoid,

Try:

ChDir "\\greg\greg\bids\"
Application.Workbooks.Open Application.GetOpenFilename

HTH,
Bernie
MS Excel MVP
 
P

PegL

Change the dialog type to msoFileDialogOpen. Then, after
the Show statement, add Workbooks.open fd.selecteditems
(1). You may need to modify the above if you allow the
user to select multiple files. Also, this assumes you're
opening an Excel file. If not, the Workbooks.open may not
be the correct statement.
 
Top