sassy
New Member
- Joined
- Feb 23, 2009
- Messages
- 38
I am trying to uncheck all my ActiveX Control checkboxes in code at the end of my macro. I have tried several routes from the threads on this site but nothing has worked. Can anyone help??
Currently working with the following. My checkboxes are all named differently.
and have tried ...
Currently working with the following. My checkboxes are all named differently.
HTML:
If IncomeReceived.Value = True Then
IncomeReceived.Value = False
Else
End If
and have tried ...
HTML:
'Dim sh As Shape
For Each sh In ActiveSheet.Shapes
'Uncheck ActiveX objects
If sh.Type = msoOLEControlObject Then
If TypeName(sh.OLEFormat.Object.Object) = "CheckBox" Then sh.OLEFormat.Object.Object = False
End If
'Uncheck Forms objects
If sh.Type = msoFormControl Then
If sh.FormControlType = xlCheckBox Then sh.OLEFormat.Object = False
End If
Next sh
End Sub