LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Count Checkboxes.


for checkboxes from the control toolbox toolbar on a worksheet

Dim obj as OleObject
Dim cnt as Long
Dim chkbx as Msforms.Checkbox
For each obj in Activesheet.OleObject
if typeof obj.Object is MsForms.Checkbox then
set chkbx = obj.Object
if chkbx = True then
cnt = cnt + 1
end if
end if
Next

For forms controls on a worksheet

Dim chkbx as Checkbox
Dim cnt as Long
for each chkbx in Activesheet.Checkboxes
if chkbx.Value = xlOn then
cnt = cnt + 1
end if
Next

--
Regards,
Tom Ogilvy


"Steven" wrote in message
...
Looking for a way to count the number of checkboxes with a check in them.

Thanks for your time,
Steven



 
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
how can I count checkboxes that have been checked? Jay Excel Discussion (Misc queries) 3 May 4th 09 05:16 PM
Using Checkboxes ppidgursky Excel Discussion (Misc queries) 0 April 7th 09 07:24 PM
how do you count checkboxes in excel2003 plhanlon Excel Worksheet Functions 1 August 23rd 05 07:05 PM
How to count checkboxes and use in .Recipients.add? Martin Los Excel Programming 2 December 2nd 03 10:05 AM
Checkboxes Thornsberry Excel Programming 1 November 11th 03 03:01 AM


All times are GMT +1. The time now is 01:17 PM.

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"