Running Excel Macros in Access 2002

R

RS

I have some macros that works well in Excel. I have Access
reports that pulls from the Excel file successfully. I
would like to use my main Access application to run the
macro in Excel prior to running my reports. Can anyone
assist?
 
A

Aaron

Dim XL as Object

Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open "C:\Folder\spreadsheet.xls" 'you'll need to set the path
and filename here
XL.Run "Macro name"

'Then be sure to destroy the objects
XL.Quit
Set XL = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top