OutputTo Cancelled

S

Samantha

I'm using the OutputTo method to export the results of a query to Excel, and
it is working fine so long as the user does not cancel the action when the
filename dialog box displays, at which point an error occurs.

This is what I wrote to ouput the results to Excel:
DoCmd.OutputTo acOutputQuery, "EmployeeList", acFormatXLS, , False

My question is: how do I capture the case where the user cancels the export
action when the filename dialog box displays (I want to keep the dialog
display)?
Any help is appreciated. Thanks in advance.
 

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