Option Button Reset

jmathew

Board Regular
Joined
Nov 22, 2004
Messages
237
Is it possible to reset all of the option buttons in an excel sheet? I have the following macro code to reset one option button:

Sub Macro1()
ActiveSheet.Shapes("Option Button 159").Select
With Selection
.Value = xlOff
End With
End Sub

Is there any way to loop through and reset all option buttons? My issue is that there are probably 1000 option buttons on the sheet.

Thank you.
 
Thank you. It worked but I received an error at the end on the following code:

Runtime error 1004


If sh.FormControlType = xlOptionButton Then
 
Upvote 0

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