Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
I've made an 'uncheck button' within Excel... I want this button to remove
all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
sorry for the double post - my browser crashed mid-post!
"FuriaRi0T" wrote: I've made an 'uncheck button' within Excel... I want this button to remove all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
Do you mean that you want to remove the check boxes altogether or simply
remove the check mark from the boxes? -- Regards, OssieMac "FuriaRi0T" wrote: sorry for the double post - my browser crashed mid-post! "FuriaRi0T" wrote: I've made an 'uncheck button' within Excel... I want this button to remove all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
Just the checkmark itself, not the actual boxes.
"OssieMac" wrote: Do you mean that you want to remove the check boxes altogether or simply remove the check mark from the boxes? -- Regards, OssieMac "FuriaRi0T" wrote: sorry for the double post - my browser crashed mid-post! "FuriaRi0T" wrote: I've made an 'uncheck button' within Excel... I want this button to remove all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
On Jul 26, 8:52 pm, FuriaRi0T
wrote: Just the checkmark itself, not the actual boxes. "OssieMac" wrote: Do you mean that you want to remove the check boxes altogether or simply remove the check mark from the boxes? -- Regards, OssieMac "FuriaRi0T" wrote: sorry for the double post - my browser crashed mid-post! "FuriaRi0T" wrote: I've made an 'uncheck button' within Excel... I want this button to remove all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. Hello FuriaRiOT, If the Check Boxes are the Forms type and located on the same worksheet then you can attach this macro to your button. Copy this code to a standard VBA module in your workbook's VBA project. Sub ClearCheckBoxes() Dim ChkBox As Object For Each ChkBox In ActiveSheet.CheckBoxes ChkBox.Value = xlOff Next ChkBox End Sub Sincerely, Leith Ross |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
It doesn't appear to have worked. If I'm supposed to manipulate the code in
someway, pardon my 'green horn'ness, but I'm not sure how. "Leith Ross" wrote: On Jul 26, 8:52 pm, FuriaRi0T wrote: Just the checkmark itself, not the actual boxes. "OssieMac" wrote: Do you mean that you want to remove the check boxes altogether or simply remove the check mark from the boxes? -- Regards, OssieMac "FuriaRi0T" wrote: sorry for the double post - my browser crashed mid-post! "FuriaRi0T" wrote: I've made an 'uncheck button' within Excel... I want this button to remove all checkboxes on the page. How would I go about doing this? There are 112 checkboxes in which the button would need to remove. Hello FuriaRiOT, If the Check Boxes are the Forms type and located on the same worksheet then you can attach this macro to your button. Copy this code to a standard VBA module in your workbook's VBA project. Sub ClearCheckBoxes() Dim ChkBox As Object For Each ChkBox In ActiveSheet.CheckBoxes ChkBox.Value = xlOff Next ChkBox End Sub Sincerely, Leith Ross |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
If you used ActiveX checkboxes then this:-
Sub UnCheckBoxesActiveX() Dim objChkBox As OLEObject With Sheets("Sheet1") For Each objChkBox In .OLEObjects If TypeName(objChkBox.Object) = "CheckBox" Then objChkBox.Object.Value = False End If Next End With End Sub -- Regards, OssieMac |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
Thank you very much Ossie. Worked like a dream.
"OssieMac" wrote: If you used ActiveX checkboxes then this:- Sub UnCheckBoxesActiveX() Dim objChkBox As OLEObject With Sheets("Sheet1") For Each objChkBox In .OLEObjects If TypeName(objChkBox.Object) = "CheckBox" Then objChkBox.Object.Value = False End If Next End With End Sub -- Regards, OssieMac |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
'Uncheck button'
If the Check Boxes are the Forms type and located on the same
worksheet then you can attach this macro to your button. Copy this code to a standard VBA module in your workbook's VBA project. Sub ClearCheckBoxes() Dim ChkBox As Object For Each ChkBox In ActiveSheet.CheckBoxes ChkBox.Value = xlOff Next ChkBox End Sub Apparently the OP's CheckBoxes were ActiveX ones as he thank OssieMac for his code; however, for your future reference, with CheckBoxes from the Forms toolbar, you don't have to iterate each CheckBox individually to uncheck them all, you can do it by executing a single line of code.... Sub ClearCheckBoxes() ActiveSheet.CheckBoxes.Value = xlOff End Sub or, if on a sheet other than the ActiveSheet (Sheet1 for example)... Sub ClearCheckBoxes() Worksheets("Sheet1").CheckBoxes.Value = xlOff End Sub Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
'Uncheck button' | Excel Programming | |||
Uncheck every Check Box Q | Excel Programming | |||
Uncheck a box | Excel Discussion (Misc queries) | |||
did I uncheck something?!?! | Excel Programming | |||
Check / Uncheck Box | Setting up and Configuration of Excel |