Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Excel Macro

Status
Not open for further replies.

thegameoflife

Programmer
Dec 5, 2001
206
US
How do you run an Excel Macro form Access?
 
I got it.

Code:
 Sub EXL()


      Dim XL As Object

      Set XL = CreateObject("Excel.Application")

      XL.Workbooks.Open "C:\Program Files\Office 2K\Office\XLStart\Personal.xls"

      ' If there is more than one macro called TestMacro,
      ' the module name would be required as in
      '
      ' XL.Run "Module1.TestMacro"
      '
      ' to differentiate which routine is being called.
      '
      XL.Run "Test"

 End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top