View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Leith Ross
 
Posts: n/a
Default How do I check/uncheck ten or odd Checkboxes by click on one check


Hello Ken,

This is a good example of the devil being in the details. There are 2
ways to create controls on a worksheet. One is by using the FORMS
toolbar and the other is the CONTROL TOOLBOX. I had thought about
including examples using both types since the are very different at the
code level. The code I wrote was for the FORMS type which people use
most often with worksheets. The CONTROL TOOLBOX is generally used on
VBA UserForms.

The behavior of either type of CheckBox is the same. If it is checked
it's value property is TRUE and if it clear then the value property is
FALSE. To check the checkbox...

If .OLEObjects(I).progID = ChkBoxId Then
.OLEObjects(I).Object.Value = TRUE
End If

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=497742