Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Initiate a trigger for clearing a list of check boxes?

I have a spreadsheet with a column of check boxes and I want to establish a
trigger to either check or uncheck all boxes at one time.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9,101
Default Initiate a trigger for clearing a list of check boxes?

You can use two contol buttons to run the code below. One control button
with the value in the code to true and the other to false


Private Sub CommandButton1_Click()
'Set checkboxes to false
For Each shp In ActiveSheet.Shapes
If shp.OLEFormat.progID = "Forms.CheckBox.1" Then
Set chkbox = ActiveSheet.OLEObjects(shp.Name).Object
chkbox.Value = False
End If
Next
End Sub
Private Sub CommandButton2_Click()
'Set checkboxes true
For Each shp In ActiveSheet.Shapes
If shp.OLEFormat.progID = "Forms.CheckBox.1" Then
Set chkbox = ActiveSheet.OLEObjects(shp.Name).Object
chkbox.Value = True
End If
Next
End Sub

"JGarland" wrote:

I have a spreadsheet with a column of check boxes and I want to establish a
trigger to either check or uncheck all boxes at one time.

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
Clearing All check boxes using Macro Anil Kumar N. Excel Discussion (Misc queries) 4 December 27th 07 10:40 AM
Clearing Check Boxes & Running a diff Macro when unchecking the ch Vick Excel Discussion (Misc queries) 6 May 30th 07 08:44 PM
Clearing Check Boxes and Cells Mel Excel Discussion (Misc queries) 1 May 26th 05 05:13 AM
Clearing Check Boxes and Cells Mel Excel Discussion (Misc queries) 1 May 25th 05 09:00 PM
Clearing Check Boxes and Cells Mel Excel Worksheet Functions 0 May 25th 05 05:52 PM


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