Clear Option Button Selections

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Again,

Is there a Macro to clear all Option Button sections?

I have one for clearing Check Boxes, but even after retooling it doesn’t
seem to work on the Option Button selections.

Thanks in advance – Jenny B.
 
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.
 
Is there a Macro to clear all Option Button sections?
I have one for clearing Check Boxes, but even after retooling it doesn’t
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
 
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 posting’s
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.
 
Back
Top