Macro linking

V

vishu

I have doubt with macro coding.
I have three macros to run.
In first step: If user press a macro button it has to run the Macro1, after
running this, there is one message box will popup asking for “Yes†or “Noâ€
Now question is If user select “Ok†it should run the macro2 and If user
select “No†it should run the macro3.
Just I want to know how to link the Macro 2 and Macro3 after message box
message button.
I hope this make sense.
Regards,
Vishu
 
D

Dave O

One way to do this is to write a "Master" macro that calls Macro1,
Macro2, and Macro3 according to the logic you describe. Perhaps
something along the lines of

Sub Master()
Ask question 1
If User say Yes then
Macro1
endif

Ask Question 2
If User say Yes then
Macro2
endif

Ask Question 3
If User say Yes then
Macro1
endif
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