Here is an article which explains how you can run Excel macros from Access: http://datapigtechnologies.com/blog/...xcel-workbook/
Oh wow, i didnt know that i can record a macro in excel and use it in access. I would definitely like to give it a try. Thank you Joe.
What you would probably want to do is take your current macro in Access, and select it and run the "Convert Macros to Visual Basic" functionality on it.
This will convert your Macro to VBA code that you can build on. So you can add VBA code to open your data file and call and run your Excel Macro code on it.
Once again, no one has to go into the Tables or Queries to export them - not even you! You can export data from them using a Macro or VBA code using a Button like you are now. All you need to know is the Query or Table name (which can easily be seen in the Record Source property of your Report).But pardon me may be i am not so keen on going to tables or queries as my supervisor would not like it also i am not adept in explaining to him
You can use the "ImportExportSpreadsheet" Macro action. In the Table Name argument is where you enter the name of the Table or Query (yes, you can use Queries here, even though it says Table Name).