General VBA Question Help.

J

James8309

Hi everyone,

I have two seperate workbooks both containing different VBA codes to
do something specific.
i.e. Workbook "A" and Workbook "B"

is it possible for me to start the macro in Workbook "A" and execute
macro from Workbook "B"?

if I have sub "A" from Workbook "A" and sub "B" from Workbook "B". How
do I code it to execute Macro "B" in Workbook "A"?

Sorry if I confused you!

Thanks for your help
 
N

Nayab

Hi everyone,

I have two seperate workbooks both containing different VBA codes to
do something specific.
i.e. Workbook "A" and Workbook "B"

is it possible for me to start the macro in Workbook "A" and execute
macro from Workbook "B"?

if I have sub "A" from Workbook "A" and sub "B" from Workbook "B". How
do I code it to execute Macro "B" in Workbook "A"?

Sorry if I confused you!

Thanks for your help

you can do the following to call the b from a

Sub call_other_macro()
Application.Run "'B.xls'!macro_b"
End Sub
 

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