Filedialog error need help

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
 
D

Dirk Goldgar

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.
 

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