FileDialogSaveAs - Adding Filters

  • Thread starter FileDialogSaveAs - Adding Filters
  • Start date
F

FileDialogSaveAs - Adding Filters

I've used the folowing code to open a FileDialogSaveAs box, but I cannot set
file extension filters. Any suggestions? Is there another way to set a
default extension?

Dim dlgSaveAs = FileDialog
Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)

dlgSaveAs.Show

.Filter.Clear
.Filter.Add "Comma Separated Value", "*.csv"
 
D

Dirk Goldgar

"FileDialogSaveAs - Adding Filters" <FileDialogSaveAs - Adding
(e-mail address removed)> wrote in message
I've used the folowing code to open a FileDialogSaveAs box, but I
cannot set file extension filters. Any suggestions? Is there
another way to set a default extension?

Dim dlgSaveAs = FileDialog
Set dlgSaveAs = Application.FileDialog(msoFileDialogSaveAs)

dlgSaveAs.Show

.Filter.Clear
.Filter.Add "Comma Separated Value", "*.csv"

If I recall correctly, Access doesn't support the SaveAs file dialog
anyway, though the help file doesn't make that very clear. Yuo may want
to call the Windows File Open/Save Dialog API directly, using code such
as that found at:

www.mvps.org/access/api/api0001.htm
 

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