Sub RemoveCheck()
Worksheets("Tasks").CheckBox1.Value = False
End Sub
Maybe you can try...
Code:Sub RemoveCheck() Worksheets("Tasks").CheckBox1.Value = False End Sub
Sub Test
Dim CheckBox1 As Object
Dim shtTask As Worksheet
Set shtTask = ThisWorkbook.Worksheets("Tasks")
shtTask.CheckBox1.Value = False
End Sub
Are you using a form control or an activeX control - I suggest you use an ActiveX control. dont dim the checkbox - no need
Sub Test()
Dim shtTask As Worksheet
Set shtTask = Worksheets("Tasks")
shtTask.CheckBoxes("Check box 1").Value = False
End Sub
If you are using a form checkbox...
Code:Sub Test() Dim shtTask As Worksheet Set shtTask = Worksheets("Tasks") shtTask.CheckBoxes("Check box 1").Value = False End Sub
Sheet1.CheckBox1.Value = False
As Jeffrey says, the last method he shows is for Forms toolbar checkboxes.
Why not use the codename for the sheet, and get the benefit of IntelliSense?
Change Sheet1 to the codename for the sheet.Code:Sheet1.CheckBox1.Value = False