PC Review


Reply
Thread Tools Rate Thread

all the check boxes should be checked if i check a particular checkbox in that row

 
 
rg.ruchigoel@gmail.com
Guest
Posts: n/a
 
      18th Apr 2007
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 With Quote
 
 
 
 
papou
Guest
Posts: n/a
 
      18th Apr 2007
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
<(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
> 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 With Quote
 
papou
Guest
Posts: n/a
 
      18th Apr 2007
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" <cestpasbon@çanonplus44.fr> a écrit dans le message de news:
%(E-Mail Removed)...
> 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
> <(E-Mail Removed)> a écrit dans le message de news:
> (E-Mail Removed)...
>> 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 With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      18th Apr 2007
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)

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum of check boxes that have been checked confused?? Microsoft Excel Misc 2 3rd Sep 2009 08:41 AM
Sum of check boxes that have been checked confused?? Microsoft Excel Worksheet Functions 2 3rd Sep 2009 05:17 AM
how to check whether checkbox is checked or not? Jayender Microsoft C# .NET 0 8th Aug 2006 03:49 PM
Hightlite a check box when the checkbox is checked =?Utf-8?B?bWFubnk=?= Microsoft Word Document Management 0 8th Aug 2005 09:39 AM
Re: Check Boxes - only one can be checked Peo Sjoblom Microsoft Excel Worksheet Functions 0 27th May 2004 06:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:50 AM.