#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Check Boxes

I have a Series of Check Boxes (the ActiveX Control) inserted onto an Excel
Spreadsheet. I have another Check Box that I want to use as most are used,
when it gets checked, all the checkboxes will show themselves as checked.
The only way i can figure to do this is to loop through all the check boxes,
one by one and change its state to checked. The way I want to see it done is
whenever the Main checkbox is checked i want all the other checkboxes to
change state to checked simultaneously....not one at a time when looping. Is
there a way this can be done or am I stuck with the loop? Any thoughts or
suggestions would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Check Boxes

A loop I am afraid, but automatic.

This assumes the master checkbox is called chkMaster

Private Sub chkMaster_Click()
Dim mpOLEObject As Object
With Me
For Each mpOLEObject In .OLEObjects
If TypeName(mpOLEObject.Object) = "CheckBox" Then
If mpOLEObject.Name < "chkMaster" Then
mpOLEObject.Object.Value =
Me.OLEObjects("chkMaster").Object.Value
End If
End If
Next mpOLEObject
End With
End Sub


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Kevin E." wrote in message
...
I have a Series of Check Boxes (the ActiveX Control) inserted onto an Excel
Spreadsheet. I have another Check Box that I want to use as most are
used,
when it gets checked, all the checkboxes will show themselves as checked.
The only way i can figure to do this is to loop through all the check
boxes,
one by one and change its state to checked. The way I want to see it done
is
whenever the Main checkbox is checked i want all the other checkboxes to
change state to checked simultaneously....not one at a time when looping.
Is
there a way this can be done or am I stuck with the loop? Any thoughts or
suggestions would be greatly appreciated.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
all the check boxes should be checked if i check a particular checkbox in that row [email protected] Excel Programming 3 April 18th 07 09:20 AM
How do I increase the size of check in check boxes Adams, Les Excel Discussion (Misc queries) 0 September 19th 06 02:35 PM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM
How do i create a value for check boxes or option boxes Tim wr Excel Discussion (Misc queries) 1 February 9th 06 10:29 PM


All times are GMT +1. The time now is 11:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"