Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the stated output of OptionButtons
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the stated output of OptionButtons
On Jan 11, 3:20*pm, "Nigel" wrote:
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.- Hide quoted text - - Show quoted text - Hey Nigel, Thanks so much for that. Is there any way that I can get the numbers to appear independently? Say I'm doing this for a survey (designing a survey). And the user is extremely fickle and may choose any of the options and then change their mind and go back and change it again. Assuming that I'm this user, I clicked "Rating 1" and the number 1 appeared.. But when I clicked "Rating 2", the number 2 appeared as well meaning that I would have problems tallying my results at the end as they do not stand alone. Does this make sense? I really hope it does!! Thanks so much!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying Formulas - correctly stated | Excel Discussion (Misc queries) | |||
Set of varibles produces one output. Need series of output. | Excel Programming | |||
Matching cells (RE-STATED) | Excel Discussion (Misc queries) | |||
Changing the format of an Excel output file made by Microsoft Access | Excel Discussion (Misc queries) | |||
Excel 2003 prompts for the password when I am not opening the stated file. | Excel Programming |