Run Excel Macro from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to run an excel macro that i have already created in an access?

I was thinking of running this excel macro in an Access Macro. Is there a
function such as "TransferSpreadsheet" or the like that would run this Excel
Macro?

The macro that I have created in Excel essentially opens spreadsheet "A",
formats data in spreadsheet "A", then saves as spreadsheet "B".

Ryan
 
Is it possible to run an excel macro that i have already created in an access?

I don't understand.
I was thinking of running this excel macro in an Access Macro. Is there a
function such as "TransferSpreadsheet" or the like that would run this Excel
Macro?

The macro that I have created in Excel essentially opens spreadsheet "A",
formats data in spreadsheet "A", then saves as spreadsheet "B".

Untested:
Set objExcel = CreateObject("Excel.Application")
objExcel.Run("d:\path\workbook.xl!xlmacro")
objExcel.Quit

It may need
objExcel.Workbooks.Open("d:\path\workbook.xl!xlmacro")
as 2nd statement.
 
Back
Top