Looping through checkboxes
I have a macro that has a pair of loops in it. I have inserted checkboxes
into the sheet to enable the user to skip certain lines when the macro runs.
The problem is I have Checkbox1, checkbox2, and so on.
For myLine = 1 To 5
If Sheet1.Checkbox1 = True Then
myPath = dirPath & ... & mySheet & "'!E24"
ActiveCell.Value = "='" & myPath
Cells(ActiveCell.Row + 1, 2).Select
Else
Cells(ActiveCell.Row + 1, 2).Select
End If
Next myLine
I want to use the "myLine" counter in the loop to check each checkbox for
the True condition.
I am sure there is a simple way, I just cannot seem to figure it out. Any
help would be appreciated. Thanks!
|