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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Call an Excel VBA Macro

Status
Not open for further replies.
Oct 22, 2001
215
US
Hi,
I am trying to call an Excel VBA macro from a VB program.

I got an excel file that got a macro (MyMacro). I can open the excel program fine using the following command:
--------------------------------------------
Workbooks.Open FileName:= _
"C:\MYTEST\Macro_Visio\TNT_DB.xls"
--------------------------------------------
But I don't know how to excute the Macro...
Can any one help plz. Thanks
 
In a VBA application we would use something like:
Application.run "Macroname"

I presume you have to make sure you refence the Excel application and then run it.

Hopoe this helps

asjeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top