I am running an update from within an Access 2010 database using VBA code. The update needs to update some tables by calling queries. This part works fine. I need to call a VBA macro in an Excel workbook to update the tables and pivot tables (which happen to get their data from the same Access database from which the VBA code is executing).
I get an error on the first line of code in the Excel workbook. The first line simply is to select the approprite worksheet. I know I am over complicating this. But the whole reason is that I have to update the data since the code in the Access macro takes the summary worksheet and spits it out as html in a outlook mail message (which works beautifully).
Should I just take the code for calling the refresh and add the code for the html email to it? Calling the Access stuff first, exit Access, then call the function by calling for Excel to open, do its thing, then exit Excel?