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

J

Jacob Skaria

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
 

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