Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use something similar to this in a lot of userforms and was hoping that
there might be a better way. Scenario....... I want to pass the number of the CommandButton clicked to another sub. How I do it now...... Private Sub CBClick() ' Do stuff here based on the BoxClicked Number End Sub Private Sub CommandButton1_Click() BoxClicked = 1 CBClick End Sub Private Sub CommandButton2_Click() BoxClicked = 2 CBClick End Sub ' continued for another 97 Command Buttons Private Sub CommandButton99_Click() BoxClicked = 99 CBClick End Sub Is there a better way????? Thanks, John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to make control number in cell | Excel Discussion (Misc queries) | |||
Number of UserForm Control Objects | Excel Programming | |||
Auto control number | Excel Worksheet Functions | |||
Control Displays Number Instead of Date | Excel Programming | |||
document control number | Excel Programming |