Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have own CommandBar "MyMenu" with three msoCommandButton. Each
CommandButton runs the macro, I change only the rowsource for UserForm. E.g. CommandButton(1) runs MyMacro1 with setting the rowsource="range1", CommandButton(2) runs MyMacro2 with setting the rowsource="range2". I have for each CommandButton own macro. Is some way how to find out which CommandButton was pressed and this argument I can use in next code. myPressButton = 'which CommandButton was pressed ' Sub MyMacroAll Select Case myPressButton Case ?: UserForm1.rowsource = "range1" Case ??: UserForm1.rowsource = "range2" End Select End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If pressed no to msgbox, then exit sub | Excel Programming | |||
Delete is Pressed then Stop | Excel Programming | |||
Which button was pressed? | Excel Programming | |||
Errormessage when button is pressed twice or more | Excel Programming | |||
Trapping key pressed in a worksheet | Excel Programming |