Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Option Button (Forms Control)

  Asked By: Anpu    Date: Aug 31    Category: MS Office    Views: 666
  

I am using Option Buttons and having them return a single number
value to Excel cell L10, where the value reflects the option that has
been selected.

I have set up a macro with a case statement, which starts as below:


Sheets("Index").Select
Select Case Range("L10")

Case Is = 0
End

Case Is = 1
Sheets("Chart of Accounts").Select
Range("BB3").Select

...more cases will follow...


This works when I click a macro button which has the macro assigned
to it, but what I really would like would be for the action to take
place automatically when clicking on the selected option button. Is
this possible, and if so, how would I do it? Thanks again in advance
for any help that you can give me.

I know this is ambiguous, but I am using "macro button" to mean the
rectangular top LEFT BUTTON in Form Controls, and "option button" to
mean the round top RIGHT BUTTON in Form Controls. Hope this helps.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Eline Bakker     Answered On: Aug 31

If you're using an optionbutton on a userform or an optionbutton from
the control  toolbox toolbar, then in design mode, doubleclicking the
option button  will take you to the code for the click  event for that
option button.
If you're using an optionbutton from the Forms toolbar on an excel
sheet you can assign it a macro  as you would a normal button.

 
Answer #2    Answered By: Harriet Hughes     Answered On: Aug 31

I am using one of the forms  toolbar forms on an Excel sheet, and your
suggestion worked perfectly!

 
Didn't find what you were looking for? Find more on Option Button (Forms Control) Or get search suggestion and latest updates.




Tagged: