Choosing file name when exporting to Excel (1 Viewer)

p595659

Registered User.
Local time
Today, 05:25
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
 

KenHigg

Registered User
Local time
Yesterday, 23:25
Joined
Jun 9, 2004
Messages
13,327
I would think you could simply leave that option empty;

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

???
 

p595659

Registered User.
Local time
Today, 05:25
Joined
Jul 5, 2006
Messages
30
Hey Ken,
yup that did the trick. :)

Ben
 

Users who are viewing this thread

Top Bottom