Running excel macro after exporting data into Excel

dwhite

Registered User.
Local time
Today, 21:42
Joined
Dec 26, 2000
Messages
13
I am using an Acess macro to send data from Access to an Excel Spreadsheet. This creates the worksheet with the data. I will then run an Excel macro while the spreadsheet is open to format the spreadsheet. What I want to do is have the Excel macro run automatically after the spreadsheet is open. I have tried different code combinations, but I can't seem to get the macro to run. All
my macros are stored in Personal.xls. So I am looking to see if there are any code examples I can use to both output the data and then run the Excel macro. Thanks for any help.
 
In Excel, the equivalent of the autoexec macro is auto_open - you will need to put this in a module.
 
Try This

Dim ExcelApp As Object

With ExcelApp

.Application.Run "'M:\Macros.xls'!TransposeReport"

Greg
 

Users who are viewing this thread

Back
Top Bottom