Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing Optionbutton Value
I have 3 optionbuttons (optionbutton1 - 3) which are in optiongroup lunch.
Since only one of the three button can be active, how would I place that value of the active optionbutton in a cell. optionbutton1 = 0 optionbutton2 = 30 optionbutton3 = 60 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing Optionbutton Value
Patrick, please see the code below.
Private Sub OptionButton1_Click() ActiveCell.Value = 0 End Sub Private Sub OptionButton2_Click() ActiveCell.Value = 30 End Sub Private Sub OptionButton3_Click() ActiveCell.Value = 60 End Sub -- Regards, Colo http://www.puremis.net/excel/ "Patrick Simonds" wrote in message ... I have 3 optionbuttons (optionbutton1 - 3) which are in optiongroup lunch. Since only one of the three button can be active, how would I place that value of the active optionbutton in a cell. optionbutton1 = 0 optionbutton2 = 30 optionbutton3 = 60 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing Optionbutton Value
I am hoping to do this when I click on a Finished commandbutton and have all
item (including the optionbutton selection) placed on the worksheet at the same time. "Colo" wrote in message ... Patrick, please see the code below. Private Sub OptionButton1_Click() ActiveCell.Value = 0 End Sub Private Sub OptionButton2_Click() ActiveCell.Value = 30 End Sub Private Sub OptionButton3_Click() ActiveCell.Value = 60 End Sub -- Regards, Colo http://www.puremis.net/excel/ "Patrick Simonds" wrote in message ... I have 3 optionbuttons (optionbutton1 - 3) which are in optiongroup lunch. Since only one of the three button can be active, how would I place that value of the active optionbutton in a cell. optionbutton1 = 0 optionbutton2 = 30 optionbutton3 = 60 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing Optionbutton Value
So the code for the CommansButton would be something like this.
Private Sub CommandButton1_Click() Dim lngValue As Long If OptionButton1.Value Then lngValue = 0 If OptionButton2.Value Then lngValue = 30 If OptionButton3.Value Then lngValue = 60 ActiveCell.Value = lngValue End Sub -- Regards, Colo http://www.puremis.net/excel/ "Patrick Simonds" wrote in message ... I am hoping to do this when I click on a Finished commandbutton and have all item (including the optionbutton selection) placed on the worksheet at the same time. "Colo" wrote in message ... Patrick, please see the code below. Private Sub OptionButton1_Click() ActiveCell.Value = 0 End Sub Private Sub OptionButton2_Click() ActiveCell.Value = 30 End Sub Private Sub OptionButton3_Click() ActiveCell.Value = 60 End Sub -- Regards, Colo http://www.puremis.net/excel/ "Patrick Simonds" wrote in message ... I have 3 optionbuttons (optionbutton1 - 3) which are in optiongroup lunch. Since only one of the three button can be active, how would I place that value of the active optionbutton in a cell. optionbutton1 = 0 optionbutton2 = 30 optionbutton3 = 60 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OptionButton value | Excel Programming | |||
OptionButton | Excel Programming | |||
Better Way to Use OptionButton | Excel Programming | |||
Better Way to Use OptionButton | Excel Programming | |||
which optionbutton is on | Excel Programming |