View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default Changing the stated output of OptionButtons

If you are using an activeX control OptionButton I presume you have linked
the option button to your worksheet using the linkedcell. Firstly remove
this link. Then in the click event for each option button add

Private Sub OptionButton1_Click()
If OptionButton1 Then Sheets(1).Range("A1") = 1
End Sub

Private Sub OptionButton2_Click()
If OptionButton2 Then Sheets(1).Range("A1") = 2
End Sub

If you have multiple questions do not forget to use the GroupName to ensure
each set of option buttons for each question have a unique GroupName


--

Regards,
Nigel




"samela" wrote in message
...
I'm a complete Excel and VBA newbie and would like to know if it's
possible to change the output of OptionButtons from 'TRUE' or 'FALSE'
to "1"/"2"/"3"/etc..

The name of each button is:
Rating 1
Rating 2
Rating 3
Rating 4
and so forth..

The idea is for each rating to output its assigned number such that if
the user were to click "Rating 1", the result would be "1", "Rating 2"
= 2 and so on. I'm trying to design a survey and these results will
then be used to calculate an average rating.

Hope this makes sense,
Thanks.