Setting filter for msoFileDialogSaveAs

T

TomT

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
 
D

Douglas J. Steele

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):
 
T

TomT

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.
 

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

Top