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 through vbs

Status
Not open for further replies.

davethegog

Instructor
Oct 3, 2002
9
GB
I'm trying to open an excel file and subsequently run an excel macro through a vbs file. I've got this far but can't seem to finish off.

Set objExcel = createobject("Excel.application")
objexcel.Visible = True
objexcel.Workbooks.open "c:\training 2.xls"
objexcel.application.run macro ="test"
objexcel.Quit

Any suggestions would be appreciated.
 
Have you tried this ?
objexcel.Application.Run "test"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top