J
jfp
In response to a button click on a form, i wish to bring up the standard
"File SaveAs" dialog. In the Click event, i have this code:
'Declare a variable as a FileDialog object.
Dim fd As FileDialog
'Create a FileDialog object as a File SaveAs dialog box.
Set fd = Application.FileDialog(msoFileDialogSaveAs)
When i try to run it, i get this error on the line above:
Run Time Error -2147467263 (80004001)
The expression you entered refers to an object that is closed or
doesn't exist.
The code is copied from the on-line Microsoft Access VB Reference.
I also tried changing the line in question to:
Set fd = Me.Application.FileDialog(msoFileDialogSaveAs)
but that had no effect.
I have a reference to the "Microsoft Office 10.0 Object Library"
I am running Access XP (2002) under Windows 2000.
What's wrong ?
"File SaveAs" dialog. In the Click event, i have this code:
'Declare a variable as a FileDialog object.
Dim fd As FileDialog
'Create a FileDialog object as a File SaveAs dialog box.
Set fd = Application.FileDialog(msoFileDialogSaveAs)
When i try to run it, i get this error on the line above:
Run Time Error -2147467263 (80004001)
The expression you entered refers to an object that is closed or
doesn't exist.
The code is copied from the on-line Microsoft Access VB Reference.
I also tried changing the line in question to:
Set fd = Me.Application.FileDialog(msoFileDialogSaveAs)
but that had no effect.
I have a reference to the "Microsoft Office 10.0 Object Library"
I am running Access XP (2002) under Windows 2000.
What's wrong ?