#1   Report Post  
vishu
 
Posts: n/a
Default Macro linking

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

  #2   Report Post  
Dave O
 
Posts: n/a
Default

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

  #3   Report Post  
vishu
 
Posts: n/a
Default

Hi Dave,
Should I use "switches" in between macros.
regards
vishu

"Dave O" wrote:

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save original data after macro is run again MINAL ZUNKE New Users to Excel 3 July 7th 05 12:48 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"