Forum Discussion

karenlorr_uk's avatar
karenlorr_uk
Copper Contributor
Apr 06, 2021

Export access query to formatted Excel spreadsheet - VBA.

 

I have a query (qry_myexport) and if I right click it in the navigation pane the option to export it (formatted) to excel is shown.

How can I code a button to do this in VBA?


I have searched extensively and all the VBA codes I’ve found are quite complex.  So I have simply been Right Clicking the query and exporting it that way.  But surely there must be a simple way to do this with VBA.


Thank you

Resources