![]() |
Clear Option Button Selections
Hi Again,
Is there a Macro to clear all Option Button sections? I have one for clearing Check Boxes, but even after retooling it doesnt seem to work on the Option Button selections. Thanks in advance €“ Jenny B. |
Clear Option Button Selections
If the option buttons are in a userform, this would work:
Sub ClearOptionButtons() Dim anyControl As Control For Each anyControl In Me.Controls If TypeName(anyControl) = "OptionButton" Then anyControl = False End If Next End Sub If your controls are not in a form, a little more information about your setup would be in order. "Jenny B." wrote: Hi Again, Is there a Macro to clear all Option Button sections? I have one for clearing Check Boxes, but even after retooling it doesnt seem to work on the Option Button selections. Thanks in advance €“ Jenny B. |
Clear Option Button Selections
Is there a Macro to clear all Option Button sections?
I have one for clearing Check Boxes, but even after retooling it doesnt seem to work on the Option Button selections. If you are still using controls from the Forms Toolbar (as I think you were in your previous posts), then this should clear them in the same way my other code cleared the CheckBoxes... ActiveSheet.OptionButtons.Value = False or this (assuming your work sheet name is the same as before)... Worksheets("background").OptionButtons.Value = False Rick |
Clear Option Button Selections
Thank you very much for all of your help.
You were right on the money with the use of the Option Button vs. the Checkbox. After a little information gathering from Google, I found how to both group and use the Options Button to perform the previous postings criteria. Additionally, your latest post has helped me add the Clear feature and completed what I need to get my Survey up and running Thanks again for all of your helpful advice and insight €“ Jenny B. "Rick Rothstein (MVP - VB)" wrote: Is there a Macro to clear all Option Button sections? I have one for clearing Check Boxes, but even after retooling it doesnt seem to work on the Option Button selections. If you are still using controls from the Forms Toolbar (as I think you were in your previous posts), then this should clear them in the same way my other code cleared the CheckBoxes... ActiveSheet.OptionButtons.Value = False or this (assuming your work sheet name is the same as before)... Worksheets("background").OptionButtons.Value = False Rick |
All times are GMT +1. The time now is 05:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com