Calling Export Wizard from VBA (1 Viewer)

Blueskies

Registered User.
Local time
Today, 05:02
Joined
Oct 23, 2009
Messages
69
Hi

Can the Export Wizard be called from a VBA module? (I imagine it could be done by sendkeys, but I don't want to go there.....)

It would be great if I could pass it the name of a query I want to export as Excel, and then have the wizard take over from there.

Thanks for reading.
 

Blueskies

Registered User.
Local time
Today, 05:02
Joined
Oct 23, 2009
Messages
69
No worries - found it:


Code:
DoCmd.RunCommand acCmdExportExcel
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:02
Joined
Oct 29, 2018
Messages
21,471
Hi. You could try using either the RunCommand method, which could start the Wizard or the OutputTo method, which could prompt the user for the format and filename.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:02
Joined
Oct 29, 2018
Messages
21,471
No worries - found it:


Code:
DoCmd.RunCommand acCmdExportExcel

Oops, too slow. Glad to hear you got it. Good luck with your project.
 

Blueskies

Registered User.
Local time
Today, 05:02
Joined
Oct 23, 2009
Messages
69
Thanks for reply - great to know you can get help on these forums!
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 00:02
Joined
Apr 27, 2015
Messages
6,337
PMFJI, but if the export is the same filename and format, etc, you might what to look into saved exports...
 

Users who are viewing this thread

Top Bottom