Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default CheckBox question

I have many, many, many check boxes on a worksheet. Under certain conditions
when the sheet is activated, I need to uncheck ALL the checkboxes. Without
naming each checkbox individually How can I do this in a loop?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default CheckBox question

Try this

Dim CB As OLEObject

For Each CB In ActiveSheet.OLEObjects
If TypeName(CB) = "CheckBox" Then
CB.Object.Value = False
End If
Next CB

--
Regards

Juan Pablo González

"Sheldon" wrote in message
...
I have many, many, many check boxes on a worksheet. Under certain

conditions
when the sheet is activated, I need to uncheck ALL the checkboxes.

Without
naming each checkbox individually How can I do this in a loop?

thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default CheckBox question

Dave Peterson posted this

And if you used checkboxes from the Forms toolbar (on a worksheet):
ActiveSheet.CheckBoxes.Value = xlOn 'xlOff



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Juan Pablo González" wrote in message ...
Try this

Dim CB As OLEObject

For Each CB In ActiveSheet.OLEObjects
If TypeName(CB) = "CheckBox" Then
CB.Object.Value = False
End If
Next CB

--
Regards

Juan Pablo González

"Sheldon" wrote in message
...
I have many, many, many check boxes on a worksheet. Under certain

conditions
when the sheet is activated, I need to uncheck ALL the checkboxes.

Without
naming each checkbox individually How can I do this in a loop?

thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default CheckBox question

Both solutions offers did not work!

"Sheldon" wrote:

I have many, many, many check boxes on a worksheet. Under certain conditions
when the sheet is activated, I need to uncheck ALL the checkboxes. Without
naming each checkbox individually How can I do this in a loop?

thanks

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
Checkbox Question slow386 Excel Discussion (Misc queries) 7 July 21st 07 12:06 AM
Checkbox Question MCrum Excel Discussion (Misc queries) 1 January 15th 07 12:38 PM
Checkbox question Adam Kroger Excel Discussion (Misc queries) 0 December 19th 05 12:41 PM
quick question on a checkbox eluehmann[_2_] Excel Programming 0 September 24th 04 04:38 PM
CheckBox (unclicking) Question jordanctc[_18_] Excel Programming 0 September 20th 04 06:40 PM


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