Dharris144
Board Regular
- Joined
- Jul 22, 2009
- Messages
- 97
i have a sheet with a hundred check boxes. Can someone help with a VBA script to assign the same macro to all checkboxes on current sheet?
Sub AssignCheckboxMacro()
Dim cb As Shape
For Each cb In ActiveSheet.Shapes
If cb.Type = msoFormControl Then
If cb.FormControlType = xlCheckBox Then
cb.OnAction = "[COLOR=#ff0000]Module1[/COLOR].[COLOR=#ff0000]Test[/COLOR]"
End If
End If
Next cb
End Sub