View Full Version : Running excel macro after exporting data into Excel


dwhite
12-22-2002, 05:34 PM
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.

Mile-O
12-23-2002, 02:49 AM
In Excel, the equivalent of the autoexec macro is auto_open - you will need to put this in a module.

gmann
12-23-2002, 07:11 AM
Try This

Dim ExcelApp As Object

With ExcelApp

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

Greg