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

Calling Macro on another workbook!

Status
Not open for further replies.

annanathan

Programmer
May 1, 2002
24
0
0
CA
Hi All,
I need help on how to call a Macro on a workbook from another workbook. I'm using Excel 97. I think in Excel 4 we could have done something like
Application.Run Macro:="Workbook_name!macro_name"

Does anybody know how to do this in Excel 97
Thank you in advance.
 
Try

Application.Run ("Workbook_name!macro_name")

A.C.
 
Hi A.C.

I tried Application.Run ("Workbook_name!Macro_name") and it gives me a run-time error (91) saying "Object variable or With block not set.

Do you know how to fix this?

Thank you.
 
Do you have the workbook open at the time the code is called ?.

If not you would need to set a reference to the file in the calling workbook.

A.C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top