Hi all, using excel 2003...
I have a form with 6 checkboxes, that I want to clear out. I have not changed the default name, so they are checkbox1, checkbox2, checkbox3, etc.
I tried using
But I get a "Object doesn't support this property or method" error.
I found the code below and used it to detect all checkboxes. I have the below code in Module1
Then in my workbook I call it after the user hits a button...
I check all my boxes, run the code, and nothing happens.
Any ideas of what I'm doing wrong.. this might be soo easy i'm making it more difficult than it is.....
I have a form with 6 checkboxes, that I want to clear out. I have not changed the default name, so they are checkbox1, checkbox2, checkbox3, etc.
I tried using
Code:
Sheets("sheet1").checkbox4.Value = False
But I get a "Object doesn't support this property or method" error.
I found the code below and used it to detect all checkboxes. I have the below code in Module1
Code:
Sub Uncheck() Dim oCB As OLEObject With Sheets("Sheet1") For Each oCB In .OLEObjects If TypeName(oCB.Object) = "CheckBox" Then oCB.Object.Value = False End If Next oCB End With End Sub
Then in my workbook I call it after the user hits a button...
Code:
Call Uncheck
I check all my boxes, run the code, and nothing happens.
Any ideas of what I'm doing wrong.. this might be soo easy i'm making it more difficult than it is.....