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: 5
Default Looping through a group of checkboxes

I'm trying to loop through a group of checkboxes, but i'm having trouble
figuring out how to go about it.

here is my current code:

Dim o As OLEObject
Dim iCCCount, iCCColumn As Integer
Dim iCGCount, iCGColumn As Integer
iCCCount = 1
iCCColumn = 1
iCGCount = 1
iCGColumn = 1
'MsgBox cgAdvertiser.Caption
Dim c As CheckBox
For Each o In Sheet1.OLEObjects
If TypeName(o.Object) = "CheckBox" Then
If c.GroupName = "CG" Then
iCGCount = iCGCount + 1
End If
End If
Next

so when it finds the type checkbox object i want to get the groupname.
however i get an error telling me that object var or with var is not set.

any help woulb be appreciated.
thanks




 
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
Group Checkboxes to only allow on "checked" box T.Roy Excel Worksheet Functions 6 May 17th 07 05:00 PM
Looping Checkboxes on Worksheet Robbyn Excel Programming 2 August 7th 05 09:09 PM
How to select checkBoxes as a group in Fendic[_3_] Excel Programming 1 June 7th 05 02:43 AM
Checkboxes to spreadsheet using a looping macro Eddie[_5_] Excel Programming 0 September 8th 04 11:04 AM
Looping checkboxes embedded in worksheet Theresa[_5_] Excel Programming 1 February 27th 04 04:41 AM


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

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

About Us

"It's about Microsoft Excel"