Hi,
I want to delete the checkboxes on the empty rows (am testing on the row B; for exp; if B6 is empty then delete checkbox in E6)
Now the code is working except for it is deleting all the checkboxes not only the empty rows ones
Btw, I can't combine the two in conditions with and & ?
I want to delete the checkboxes on the empty rows (am testing on the row B; for exp; if B6 is empty then delete checkbox in E6)
Now the code is working except for it is deleting all the checkboxes not only the empty rows ones
Btw, I can't combine the two in conditions with and & ?
VBA Code:
Dim n As Long
Dim k As Long
Dim cl As Range
For Each cl In Range("B2:B25")
k = k + 1
If IsEmpty(cl) Then
If HasCheckbox(Range("E1").Offset(k, 0)) = True Then
cb.Delete
End If
n = n + 1
End If
Next cl