Running Excel macro from access

  • Thread starter Thread starter king_jonathan
  • Start date Start date
K

king_jonathan

Guest
I need to make a switchboard button which will run an Access macro, open an Excel file and then run a macro in the Excel workbook.

I can open an excel workbook in an Access module, and do all the other bits, but I don't know how to run the excel macro.

:confused: Is there any way of doing this?? (i'm sure there is)

could somebody please tell me the code?

Thanks a lot
:D
 
This works for me.
Code:
Dim excelapp As excel.Application


Set excelapp = CreateObject("excel.application")
excelapp.Workbooks.Open ("c:\dir\file.xls")
excelapp.Run ("macroname")
excelapp.Quit

Fuga.
 

Users who are viewing this thread

Back
Top Bottom