PC Review


Reply
Thread Tools Rate Thread

Changing the stated output of OptionButtons

 
 
samela
Guest
Posts: n/a
 
      11th Jan 2008
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.
 
Reply With Quote
 
 
 
 
Nigel
Guest
Posts: n/a
 
      11th Jan 2008
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
(E-Mail Removed)



"samela" <(E-Mail Removed)> wrote in message
news:ecd06818-8b76-446d-a171-(E-Mail Removed)...
> 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.


 
Reply With Quote
 
samela
Guest
Posts: n/a
 
      11th Jan 2008
On Jan 11, 3:20*pm, "Nigel" <nigel-...@nosupanetspam.com> 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
> nigelnos...@9sw.co.uk
>
> "samela" <samantha.eemei....@gmail.com> wrote in message
>
> news:ecd06818-8b76-446d-a171-(E-Mail Removed)...
>
>
>
> > 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 With Quote
 
Nigel
Guest
Posts: n/a
 
      11th Jan 2008
I think that if you set up the options to write to the same worksheet cell
then if the user chooses another option then the latest choice (number) will
only be recorded. As I said in my last post it is important to group the
options for each question.

Say you have two questions with 2 options for each, then the GroupName for
the first question and associated option buttons could be set to Q1, the
second question and buttons GroupName would be Q2 etc.

For each GroupName only one of the option buttons can be selected, and the
corresponding recorded value will change to reflect that change, if
question 1 option buttons click event writes to worksheet - say A1, and
question 2 writes to A2. Then A1 and A2 would always show the latest user
click.

Hope this helps


--

Regards,
Nigel
(E-Mail Removed)



"samela" <(E-Mail Removed)> wrote in message
news:cc660612-218c-483e-8c32-(E-Mail Removed)...
On Jan 11, 3:20 pm, "Nigel" <nigel-...@nosupanetspam.com> 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
> nigelnos...@9sw.co.uk
>
> "samela" <samantha.eemei....@gmail.com> wrote in message
>
> news:ecd06818-8b76-446d-a171-(E-Mail Removed)...
>
>
>
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the Output Path Stefan Hoffmann Microsoft ASP .NET 1 31st May 2009 10:47 PM
Changing the Output Path Stefan Hoffmann Microsoft ASP .NET 0 21st May 2009 12:49 PM
Changing the Output path Will Chapman Microsoft Dot NET Compact Framework 7 28th Jan 2006 02:57 PM
Changing output name Jerry Spence1 Microsoft VB .NET 4 28th Apr 2005 08:06 PM
Changing output to Mpeg Bob Windows XP MovieMaker 1 27th Oct 2003 04:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:22 AM.