Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Event - 2 Commands on 1 Button
I'm looking for just the basic code that will allow 2 macros to execute
independently of each other when the button they're assigned to is actuated, or toggled (for example...I use Essbase and I need to toggle it on and off frequently, as it disallows me to format sheets while it's on). I'll be using this for a variety of different "toggle" actions and just need the basic code that accomplishes this, to sandwich the macros between. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle Event - 2 Commands on 1 Button
I think this is what you wish to do (This is the code behind a button):
Private Sub CommandButton2_Click() If CommandButton2.Caption = "Second Step" Then CommandButton2.Caption = "First Step" Call SecondStep ElseIf CommandButton2.Caption = "First Step" Then CommandButton2.Caption = "Second Step" Call FirstStep End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command button to toggle worksheet event code on / off? | Excel Discussion (Misc queries) | |||
Sub() calling Sub()'s in the "worksheet event code€ť passing toggle | Excel Programming | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
commands button | Excel Programming | |||
toggle button & event code | Excel Programming |