View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Reset Checkboxes from Control Tool Box

Hi Robert,

Hi, Norman, I had attached macros to the CheckBoxes. When the Reset
Macro is executed, the individual macros attached to the CheckBoxes are
being
activated aswell. Is there a way to prevent the underlying macros from
being
executed.


Try:

'=============
Public Sub Tester()
Dim obj As OLEObject
Dim Cbox As MsForms.CheckBox

Application.EnableEvents = False
For Each obj In ActiveSheet.OLEObjects
If TypeOf obj.Object Is MsForms.CheckBox Then
obj.Object.Value = False
End If
Next obj
Application.EnableEvents = True
End Sub
'<<=============


---
Regards,
Norman