I programmatically select a line in VBA, but this gives me a TYPE MISMATCH error:
Rows(Str(i) & ":" & Str(i)).Select
what am I doing wrong?
For i = 5 To 1000
If Worksheets("5470").Cells(i, 2) = "" Then
Rows(Str(i) & ":" & Str(i)).Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Delete Shift:=xlUp
Exit For
End If
Next i
source
share