Hello I am trying to create a for loop that for every checkbox ticked adds a line into an excel file I have this so far:
For intCounter = 1 To 3
If "CheckBox" & intCounter & ".value" = True Then
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 3).Value = "A" & intCounter
ws.Cells(iRow, 1).Value = Me.TextBox2.Value
ws.Cells(iRow, 7).Value = Me.TEXT_BOX_ENGINE_HOURS.Value
End If
Next intCounter
"CheckBox" & intCounter & ".value" should convert to CheckBox1.value in the first loop and then CheckBox2.value in the second loop. They are not returning true despite the checkboxes being ticked. Can some one suggest what I am doing wrong.
Thanks
Bookmarks