FileDialogSaveAs - Adding Filters

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

Guest

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"
 
"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
 
Back
Top