F
FatMan
Hi all:
Need some help with the following piece of code being used to export a table
to excel.
Code:
DoCmd.OutputTo acOutputTable, "tblSprayrec", acFormatXLS
The code works great when the user uses the save as dialog box to save the
file. My problem occurs when the users clicks the Cancel button. Once the
cancel button is pressed a “run-time error 2501†message box pops up with the
only options being to click End or Debug.
How do I prevent this error message from showing up and have the program to
simply accept that the user has decided to cancel the export/save?
Any help is greatly appreciated.
Thanks,
FatMan
Need some help with the following piece of code being used to export a table
to excel.
Code:
DoCmd.OutputTo acOutputTable, "tblSprayrec", acFormatXLS
The code works great when the user uses the save as dialog box to save the
file. My problem occurs when the users clicks the Cancel button. Once the
cancel button is pressed a “run-time error 2501†message box pops up with the
only options being to click End or Debug.
How do I prevent this error message from showing up and have the program to
simply accept that the user has decided to cancel the export/save?
Any help is greatly appreciated.
Thanks,
FatMan