Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default looping through variable defined cell

Hi,

Can someone help me with this code....I want to loop through the
worksheet and place a check in all ( checkbox in column B) when column
C Row is blank I want the loop to stop.

It only checked the first checkbox and stopped.... I can send you a
sample worksheet if you would give me your email address.....I am not
able to send you an attached file in this forum.

I want it to go through row 66 until it finds an empty cell, my code is
probably flawed in many ways:

Please point me to the proper way to do this.

I have a sample file I can send to anyone if I can get an email
address.

Thanks

Public Sub CommandButton1_Click()
Dim CB As Variant
Dim iRow As Integer
iRow = 1

For Each CB In ActiveSheet.CheckBoxes
If Cells(iRow, "C").Value < "" Then
CB.Value = True
Else
Exit Sub
End If
iRow = iRow + 1
Next
End Sub

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
Strange looping in User-Defined function (Excel XP) G.R. Toro Excel Programming 4 September 1st 06 09:46 PM
Looping through a user defined type? plh Excel Programming 2 April 27th 06 05:38 PM
Locate cell name using variable and looping Thomas Olesen Excel Programming 3 October 12th 05 10:37 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
Looping and String Variable Mourinho Excel Programming 4 October 28th 04 10:02 PM


All times are GMT +1. The time now is 02:32 PM.

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"