Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Strange looping in User-Defined function (Excel XP) | Excel Programming | |||
Looping through a user defined type? | Excel Programming | |||
Locate cell name using variable and looping | Excel Programming | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
Looping and String Variable | Excel Programming |