[RESOLVED] Workbook Open Checkbox Controls
Hello,
The follwing code works when assigned to a command button:
Code:
With Sheets("Email")
cb1.Value = False
cb2.Value = False
End With
But when I put the code into the workbook Open function I always get an error. I've also tried:
Code:
Dim chkBox As Object
For Each chkBox In Sheets("Email").CheckBoxes
chkBox.Value = False
Next chkBox
These are activex checkboxes. Thanks.
Re: Workbook Open Checkbox Controls
vb Code:
Dim chk As OLEObject
For Each chk In Sheets("Sheet1").OLEObjects
'OLEType 2 is the checkbox, this is so it will ignore any other OLEobjects
'on your worksheet
If chk.OLEType = 2 Then
chk.Object.Value = True
End If
Next
Re: Workbook Open Checkbox Controls