Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OptionButton value Patrick Simonds Excel Programming 2 January 17th 05 10:50 AM
OptionButton nrage21[_69_] Excel Programming 1 September 29th 04 02:14 AM
Better Way to Use OptionButton [email protected] Excel Programming 0 September 1st 04 07:18 PM
Better Way to Use OptionButton [email protected] Excel Programming 4 September 1st 04 07:04 PM
which optionbutton is on Keyur Excel Programming 1 July 25th 04 05:49 AM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"