Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default macro to call other macros



Hi all

I need help to construct small routine which will call a choice of
macros.

I have in mind that if the user answers Yes to a popup then one named
macro would be run on the open workbook , and if No were chosen then a
different named macro would be run on the open workbook.

Can some one help with this?

Grateful for any advice.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default macro to call other macros

On May 3, 7:44*am, Colin Hayes wrote:
I need help to construct small routine which will call
a choice of macros.
I have in mind that if the user answers Yes to a popup
then one named macro would be run on the open workbook,
and if No were chosen then a different named macro would
be run on the open workbook.


What you ask for can be done with MsgBox. See the example below.
More generally, you might want to look the help page for InputBox.

Macros....

Sub doit()
Dim x As Long
x = MsgBox("Are you over 55?", vbYesNoCancel, "Your title")
If x = vbYes Then doit2 x _
Else If x = vbNo Then doit3 x
End Sub

Sub doit2(x As Long)
MsgBox "doit2 " & x
End Sub

Sub doit3(x As Long)
MsgBox "doit3 " & x
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
Call Macro jswalsh33 Excel Discussion (Misc queries) 2 February 21st 10 10:38 AM
How can run a macro ( call a macro) on selection of any filtercriteria? [email protected] Excel Worksheet Functions 7 February 20th 09 12:34 AM
Call an Access macro from an Excel macro Jason W Excel Discussion (Misc queries) 1 May 1st 08 08:33 PM
macro call Steve Excel Discussion (Misc queries) 12 August 25th 06 04:27 AM
How to call a macro in an XLA add-in Peter Laman Excel Discussion (Misc queries) 1 March 10th 05 05:40 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"