General VBA Question Help.

  • Thread starter Thread starter James8309
  • Start date Start date
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
 
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
 
Back
Top