filedialog problem

  • Thread starter Thread starter Zygoid
  • Start date Start date
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
 
Zygoid,

Try:

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

HTH,
Bernie
MS Excel MVP
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top