2007 Need macro to auto set option buttons all to "Yes" or "No"

  • Thread starter Thread starter Paula
  • Start date Start date
Try the below...

Dim obj As Object
For Each obj In ActiveSheet.OLEObjects
If TypeName(obj.Object) = "OptionButton" Then
obj.Object.GroupName = obj.Name
obj.Object.Value = True
End If
Next

'If you mean CheckBox then
Dim obj As Object
For Each obj In ActiveSheet.OLEObjects
If TypeName(obj.Object) = "CheckBox" Then obj.Object.Value = True
Next


If this post helps click Yes
 
Back
Top