Hi
I have a code which I am trying to use to uncheck a check box but keep getting the error "Unable to get the CheckBoxes property of Worksheet class"
Can anyone help?
![]()
Please Login or Register to view this content.
Hi
I have a code which I am trying to use to uncheck a check box but keep getting the error "Unable to get the CheckBoxes property of Worksheet class"
Can anyone help?
![]()
Please Login or Register to view this content.
Last edited by ashmott; 09-01-2011 at 10:29 PM.
![]()
Please Login or Register to view this content.
Try Sheets("Sheet1").CheckBoxes.Item("CheckBox1").Value = False
It looks like you left off the Item argument of the Checkboxes collection.
--Nickvans
Thanks guys but im still getting an error.
I have attached my workbook if yoh have a chance to take a peek.
Sorry for beng a noob.
Hello ashmott,
There were 2 problems with the code. One, the control being used is a Forms control.. You can not use False to uncheck a Forms control. You must use the Excel constant xlOff. Two, you had the control name wrong. It is "Check Box 1", not "CheckBox1". Here is the corrected and working code.
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Thanks for your help Leith, much appreciated.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks