I have a script that uses checkboxes and command buttons, and there is a macro that resets them to default on every sheet.
'opt button reset
For i = 1 To Worksheets.Count
Sheets(i).Shapes("Option Button 1").ControlFormat.Value = xlOn
Next i
'cb reset
For i = 1 To Worksheets.Count
Sheets(i).Shapes("CheckBox1").ControlFormat.Value = xlOff
Next i
The problem is that, if there is a sheet that has no checkbox or opt button, the script does not work
What I want to do is to check if the cb and ob exists and execute the script only than.
Thanks in advance