Choosing file name when exporting to Excel

p595659

Registered User.
Local time
Today, 07:48
Joined
Jul 5, 2006
Messages
30
Hi,
I would like to have a dialog box open when the user clicks on a command box so that they can choose the file name and the directory where the exported excel spreadsheet would be saved. Does anyone have any ideas? Btw, my code to save an excel automatically is below and I would like to use code.

DoCmd.OutputTo acQuery, "qryPipelineAndCommission", "MicrosoftExcel(*.xls)", "ClientList.xls", True, ""

Cheers,
Ben
 
I would think you could simply leave that option empty;

DoCmd.OutputTo acQuery, "qryPipelineAndCommission", "MicrosoftExcel(*.xls)",, True, ""

???
 
Hey Ken,
yup that did the trick. :)

Ben
 

Users who are viewing this thread

Back
Top Bottom