Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to select checkBoxes as a group in


hi, does anyone know how to select checkBoxes as a group by programmin
in Excel VBA?

I need to programm a 'checkAll' checkBox to set all checkBox value t
be true. how can I control them as a group?

Thanks a lot.
Fendic :

--
Fendi
-----------------------------------------------------------------------
Fendic's Profile: http://www.excelforum.com/member.php...fo&userid=2395
View this thread: http://www.excelforum.com/showthread.php?threadid=37695

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default How to select checkBoxes as a group in

With your "checkall" checkbox being "checkbox1", try this in a standard module:

Private Sub CheckBox1_Click()
Dim OLEobj As OLEObject
For Each OLEobj In ActiveSheet.OLEObjects
If TypeOf OLEobj.Object Is MSForms.CheckBox Then
If OLEobj.Name < "CheckBox1" Then
OLEobj.Object.Value = ActiveSheet.OLEObjects("CheckBox1"). _
Object.Value
End If
End If
Next OLEobj
End Sub
---
To use, press ALT+F11. Go to Insert Module. Paste in the code. Press ALT+Q.

HTH
Jason
Atlanta, GA




"Fendic" wrote:


hi, does anyone know how to select checkBoxes as a group by programming
in Excel VBA?

I need to programm a 'checkAll' checkBox to set all checkBox value to
be true. how can I control them as a group?

Thanks a lot.
Fendic :)


--
Fendic
------------------------------------------------------------------------
Fendic's Profile: http://www.excelforum.com/member.php...o&userid=23959
View this thread: http://www.excelforum.com/showthread...hreadid=376953


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
Select one entry per group AJ[_4_] Excel Discussion (Misc queries) 1 July 29th 08 09:57 PM
how to select group of 77 number ghost Excel Discussion (Misc queries) 1 June 10th 08 11:28 AM
Select All checkboxes Nikki Excel Discussion (Misc queries) 5 June 4th 08 12:47 AM
Group Checkboxes to only allow on "checked" box T.Roy Excel Worksheet Functions 6 May 17th 07 05:00 PM
How to create in a userform, select all/deselect all checkboxes Intruder Excel Programming 1 July 31st 03 04:53 AM


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

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

About Us

"It's about Microsoft Excel"