Setting filter for msoFileDialogSaveAs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I can't seem to find a way to do this. From all I've read, it appears perhaps it can't be done.

I want to open this dialog for users to save a file as an Excel spreadsheet. Using the following code, the filter in the Save as type is All Files (*.*). I'd like to set it to *.xls. Using the Filters.Add method returns an error (as documented in the help for this topic):

Dim dlgSaveAs As FileDialog

Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)

dlgSaveAs.Show

Can this be done?

Thanks for any assistance,

TomT
 
Try the code in http://www.mvps.org/access/api/api0001.htm at "The Access
Web" instead. It's far less problematic.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



TomT said:
I can't seem to find a way to do this. From all I've read, it appears perhaps it can't be done.

I want to open this dialog for users to save a file as an Excel
spreadsheet. Using the following code, the filter in the Save as type is All
Files (*.*). I'd like to set it to *.xls. Using the Filters.Add method
returns an error (as documented in the help for this topic):
 
Doug,

Thanks very much for your reply. I had been using that in the past, but thought the functionality of the new (to me, since I've been living in Access 97 land until recently) FileDialog object could replace it. Apparently it is somewhat limited...

Thanks for your assistance.
 
Back
Top