Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have 90 checkboxes on a worksheet and a CmdBtn to clear the selections. Is
there a way to group the checkboxes so I can clear them in one simple procedure? Or am I stuck having to list each checkbox separately in a procedure like If Sheets("Sheet1).CheckBox1.Value=True Then Sheets("Sheet1).CheckBox1.Value=False, etc. Thank you. Regards, Jim Kobzeff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
do you mean forms as in checkboxes from the forms toolbar (or do you mean
activeX checkboxes from the control toolbox toolbar also known as MSForms). for the first Activesheet.Checkboxes.Value = xloff for the 2nd for each ctrl in Worksheets("Sheet1").OleObjects if typeof ctrl is MSforms.CheckBox then set cb = ctrl.Object cb.Value = False end if Next But it sounds like you want to work on a subset of the checkboxes. If so, I would use the topleftcell property test its location on the sheet with the intersect method if not intersect(ctrl.TopLeftCell, Range("A1:F20")) is nothing then ctrl.object.Value = False End if you can use similar with the controls from the Forms toolbar for each cb in Worksheets("Sheet1").Checkboxes if not intersect(cb.TopLeftCell, Range("A1:F20")) is nothing then cb.Value = xlOff end if Next -- Regards, Tom Ogilvy "JK" wrote in message news:MBpWc.34$6b.32@trnddc04... I have 90 checkboxes on a worksheet and a CmdBtn to clear the selections. Is there a way to group the checkboxes so I can clear them in one simple procedure? Or am I stuck having to list each checkbox separately in a procedure like If Sheets("Sheet1).CheckBox1.Value=True Then Sheets("Sheet1).CheckBox1.Value=False, etc. Thank you. Regards, Jim Kobzeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA for form check boxes | Excel Worksheet Functions | |||
copy check boxes (made from form toolbar) | Excel Discussion (Misc queries) | |||
VBA code for the Check Boxes in a form | Excel Discussion (Misc queries) | |||
How do I create a Form with check boxes in Excel | Excel Worksheet Functions | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) |