Set all option buttons on worksheet to off

N

Newbeetle

Hi I use the following below to set all checkboxes on sheet 1 to off, can the
same be done for option buttons on sheet 1. The option buttons used are from
the forms toolbar.


Private Sub clear_Click()
Worksheets("sheet1").CheckBoxes.Value = xlOff
End Sub


Have tried a copy of ideas but I haven't got there yet.
 
K

Ken

This seems to work fine for me:

Sub test()

For Each OptionButton In ActiveSheet.OptionButtons
OptionButton.Value = False
Next

End Sub

Good luck.

Ken
Norfolk, Va
 
D

Dave Peterson

How about something like:

worksheets("Sheet1").OptionButtons.Value = False
 

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

Top