#1
|
|||
|
|||
Asking for Macro to Reset Checkbox
I need to make a button that reset a "check box" when it get pressed.
I have been trying to use that Macro === Sub Button2_Click() checkbox1.Value = False End Sub ===== But it generate an error "Object required". May I have an advice how to do that button with no errors ? Last edited by Control; 12-09-2012 at 03:49 AM. |
#2
|
||||
|
||||
What type of checkbox is it?
|
#3
|
|||
|
|||
It is "Check Box (Form Control)". I get it from the "Developer" Tab, then "Insert", then "Check Box (Form Control)".
I can manager to use a different type, if that will make a difference. I have attached my excel trial for refrence. |
#4
|
||||
|
||||
The way your code is trying to access it would work if it were an ActiveX control (and if it were qualified with the parent sheet in the code). Since it is a forms control, you can access it like this:
Code:
Sub Button2_Click() Sheet1.CheckBoxes("Check Box 4").Value = False End Sub |
#5
|
|||
|
|||
Colin! Thanks indeed and highly appreciate it.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to reset settings | Jennifer Murphy | Word VBA | 1 | 08-02-2012 04:12 PM |
Macro ? - Checkbox in Word + drop down selection help | dice1976 | Word | 4 | 07-24-2012 11:18 AM |
Macro to calculate a value of a checkbox. | stephen_ | Excel Programming | 1 | 06-27-2012 04:57 PM |
macro on checkbox | macrohelp | Word VBA | 0 | 03-06-2009 03:33 PM |
Reset on error | kiwichico | Word VBA | 0 | 09-23-2008 08:15 PM |