How to detect optionbutton being clicked?

  • Thread starter Thread starter crapit
  • Start date Start date
C

crapit

The option button i'm refering to is not on the userform or control box but
from the "forms" menu. Do I need to initialize anything?
 
Hi crapit
Right click on your option button and choose Assign macro (please note this
option may differ from yours - I am using a French version of Excel)
The macro thus assigned will fire each time your option button is clicked

HTH
Cordially
Pascal
 
Because the macro will be entered if it is.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I dont get what you mean! I know that there is some kind of click event,
but i dont know how to use!
 
When you create a control from the forms menu, you get an option to assign a
macro (you can also get the same option by selecting it and right-clicking).

Assign a macro, and clicking the control fires the macro. Hence the macro
knows there has been a click.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
how do i set the optionbutton to be uncheck?
Bob Phillips said:
When you create a control from the forms menu, you get an option to assign a
macro (you can also get the same option by selecting it and right-clicking).

Assign a macro, and clicking the control fires the macro. Hence the macro
knows there has been a click.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
activesheet.optionbuttons("Option Button 1").value = xloff

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Thanks for your eventhough I got it before ur reply! Btw, is it possible to
hide/unhide the control on the active sheet ?
 
Of course

activesheet.optionbuttons("Option Button 1").Visible = False

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
So for dropdown form control is it
activesheet.dropdown("drop down 1").Visible = False

If there are 3 columns of merge cell i.e A1 (A1 & A2), B1 (B1 & B2), C1
( C1 & C2 )
can i refer it as range("a1:c1")
 
I 'm unable to get this to work correctly,
ActiveSheet.DropDowns("dropdown143").Visible = True
It give unable to get the dropdown property of the class

What's wrong with it?
 
It works for me. Is it a Forms dropdown?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top