Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call Macro | Excel Discussion (Misc queries) | |||
How can run a macro ( call a macro) on selection of any filtercriteria? | Excel Worksheet Functions | |||
Call an Access macro from an Excel macro | Excel Discussion (Misc queries) | |||
macro call | Excel Discussion (Misc queries) | |||
How to call a macro in an XLA add-in | Excel Discussion (Misc queries) |