Filedialog error need help

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

Guest

I've picked up this code from the Access help. I'm trying to have the save as dialog box come up. This code is susposed to do that according to the Access help. The following is the code that I've copied into by progra
Dim dlgSaveAs As FileDialo
Set dlgSaveAs = Application.FileDialog(FileDialogType:=msoFileDialogSaveAs

dlgSaveAs.Sho

I get a compile error "Name argument not found" with the FileDialogType: highlighted, for the life of me I can not figure out what's happening. I'm hoping someone out there can shade some light on this problem

Thanks for your help
 
CD Tom said:
I've picked up this code from the Access help. I'm trying to have
the save as dialog box come up. This code is susposed to do that
according to the Access help. The following is the code
that I've copied into by program Dim dlgSaveAs As FileDialog Set
dlgSaveAs =
Application.FileDialog(FileDialogType:=msoFileDialogSaveAs)

dlgSaveAs.Show

I get a compile error "Name argument not found" with the
FileDialogType: highlighted, for the life of me I can not figure out
what's happening. I'm hoping someone out there can shade some light
on this problem.

Thanks for your help

Unfortunately, the help file is wrong. While the msoFileDialogSaveAs
constant is supported in other Office programs, it isn't supported in
Access. If you need to use a Save As dialog instead of an Open dialog,
I suggest you use the code at

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

which calls the API directly. There are examples there of both Open and
Save dialogs.
 
Back
Top