Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default 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.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,202
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clear Button JudyP Excel Discussion (Misc queries) 2 August 5th 06 08:01 PM
keep source formatting is not an option in paste option button Tina Excel Discussion (Misc queries) 0 February 20th 06 09:58 PM
create a clear button jbf frylock Excel Discussion (Misc queries) 9 January 6th 06 11:00 PM
Want to get user selections from a message box using option buttons Walt Excel Discussion (Misc queries) 1 November 4th 05 03:04 AM
count and limit radio button selections klintonselkirk Excel Worksheet Functions 1 August 17th 05 01:05 AM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"