Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default all the check boxes should be checked if i check a particular checkbox in that row

Hi

I have created 9 checkboxes in a particular sheet in a single row,
each in a single cell.
first checkbox is named 'All' and other 8 are named 'A' to 'H'. I want
when I will check 'All' checkbox all the other 8 checkboxes should
also be checked and similarly when i uncheck 'All' others should also
be unchecked. But the other 8 checkboxes can be individually checked
or unchecked. Actually these checkboxes are created to display some
data. I have done coding in Macro to display all the data when 'All'
is checked and to display individual data when other 8 checkboxes 'A'
to 'H' are checked or unchecked but in the sheet I want on checking
'All' checkbox other 8 checkboxes should also be checked bydefault.
So suggest me how can I this.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default all the check boxes should be checked if i check a particular checkbox in that row

Sorry, just noticed chekbox names from your orignal message.
Please amend:
For Each chkbx In ActiveSheet.OLEObjects
Select Case chkbx.Name
Case "A", "B", "C", "D", "E", "F", "G", "H"
ActiveSheet.OLEObjects(chkbx.Name).Object.Value = All.Value
End Select
Next

HTH
Cordially
Pascal

"papou" a écrit dans le message de news:
...
Hello
If you are using checkboxes from the Controls tool bar:
Private Sub All_Click()
For Each chkbx In ActiveSheet.OLEObjects
If chkbx.Name Like "CheckBox*" Then
ActiveSheet.OLEObjects(chkbx.Name).Object.Value = All.Value
End If
Next
End Sub

HTH
Cordially
Pascal
a écrit dans le message de news:
...
Hi

I have created 9 checkboxes in a particular sheet in a single row,
each in a single cell.
first checkbox is named 'All' and other 8 are named 'A' to 'H'. I want
when I will check 'All' checkbox all the other 8 checkboxes should
also be checked and similarly when i uncheck 'All' others should also
be unchecked. But the other 8 checkboxes can be individually checked
or unchecked. Actually these checkboxes are created to display some
data. I have done coding in Macro to display all the data when 'All'
is checked and to display individual data when other 8 checkboxes 'A'
to 'H' are checked or unchecked but in the sheet I want on checking
'All' checkbox other 8 checkboxes should also be checked bydefault.
So suggest me how can I this.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default all the check boxes should be checked if i check a particular checkbox in that row

With ActiveSheet
.CheckBoxes("A").Value = .CheckBoxes("All").Value
.CheckBoxes("B").Value = .CheckBoxes("All").Value
'etc.
End With



--
HTH

Bob

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

wrote in message
ps.com...
Hi

I have created 9 checkboxes in a particular sheet in a single row,
each in a single cell.
first checkbox is named 'All' and other 8 are named 'A' to 'H'. I want
when I will check 'All' checkbox all the other 8 checkboxes should
also be checked and similarly when i uncheck 'All' others should also
be unchecked. But the other 8 checkboxes can be individually checked
or unchecked. Actually these checkboxes are created to display some
data. I have done coding in Macro to display all the data when 'All'
is checked and to display individual data when other 8 checkboxes 'A'
to 'H' are checked or unchecked but in the sheet I want on checking
'All' checkbox other 8 checkboxes should also be checked bydefault.
So suggest me how can I this.



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
sum of check boxes that have been checked confused??[_2_] Excel Discussion (Misc queries) 3 September 4th 09 04:41 AM
Sum of check boxes that have been checked confused??[_2_] Excel Worksheet Functions 2 September 3rd 09 05:17 AM
Preventing multiple check boxes from being checked Jae Excel Discussion (Misc queries) 3 August 18th 05 10:49 PM
Check boxes - when one box is checked, I want a 2nd box to auto ch Russell-stanely Excel Discussion (Misc queries) 2 July 1st 05 08:52 PM
How do I restrict only 1 of 2 check boxes be checked? Board Excel Discussion (Misc queries) 3 May 17th 05 06:47 PM


All times are GMT +1. The time now is 10:02 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"