View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Clear certain checkboxes

If you are using checkboxes from the Forms control bar, use

Dim N As Long
Dim V As Variant
V = Array("CheckBox1", "CheckBox3")
For N = LBound(V) To UBound(V)
ActiveSheet.CheckBoxes(V(N)).Value = False
Next N

List in the Array those checkboxes you want to clear.

If you are using checkboxes from the Controls (ActiveX) control bar,
use

Dim N As Long
Dim V As Variant
Dim WS As Worksheet
V = Array("cbx1", "cbx3")
For N = LBound(V) To UBound(V)
ActiveSheet.OLEObjects(V(N)).Object.Value = False
Next N

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com





On Thu, 20 May 2010 08:59:01 -0700, Arlen
wrote:

Is there a way to identify and clear only a certain subset of checkboxes on a
worksheet?

I've got the ActiveSheet.checkboxes.value = xlOff, but of course, that
clears all checkboxes.

So...just wanting to know.

Thank you for your time.