Change or Click event for a User Form option/radio button.

batman37

New Member
Joined
Jul 21, 2007
Messages
14
I have 2 option buttons in a frame on a user form. When one of them is clicked (changes), I want to trigger code that makes the visible property of a textbox (which is not in the frame) false, that is, hide the text box. I want to do this without having to click a command button first, through which I could detect the state of the option button and act accordingly. So far I can't find or identify an option button click event. Is there such a thing, and if so how do I implement it?

Thanks for any help, code snippets, or words of wisdom.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Try double clicking the option button.
 
Upvote 0
Thanks Fluff, and my apologies for taking so long to respond.
Your suggestion seemed to do the trick, although I was hoping for some specific click-event code.
 
Upvote 0
Simply put this code in one of the option button click events
Code:
   Me.TextBox1.Visible = False
& then the same again in the other one, but change False to True
 
Upvote 0
Thanks, Fluff. Inserting that code does exactly what I want. It also leads me to try some other tricks with the click event. I consider this thread answered/solved, but I don't see a place or a button to so sdeclare.
 
Upvote 0
You're welcome & thanks for the feedback.

We don't mark threads as solved here.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,413
Members
449,082
Latest member
tish101

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top