Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Two custom menu buttons execute the same basic code but with one additional function provided by the second button. To avoid repeating the basic (lengthy) code in two modules it would be great if I could detect which button was selected. If this is possible then, noting the additional function is executed part way through the basic code, the pseudo code would look like this: Sub MenuSetUp() btn1.OnAction = "MainProc" btn2.OnAction = "MainProc" End Sub Sub MainProc() basic code If btn2 selected then do additional function rest of basic code End Sub I'm guessing each button must have a click event to trigger its OnAction statement but how do I trap this? I'd appreciate any help on this. Geoff |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Avoiding #N/A | Excel Discussion (Misc queries) | |||
Avoiding #N/A | Excel Discussion (Misc queries) | |||
Avoiding page breaks across merged cells - Code not working as expected | Excel Programming | |||
Avoiding #NUM! | Excel Worksheet Functions | |||
Avoiding 400 Error code | Excel Programming |