A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You must end the If ... Then block with End If instead of just End:
Sub DelEmptyRows()
Dim i As Integer
Do While Cells(i, 1) <> 515
If Cells(i, 1) = "" Then
Rows(i).Select
Selection.Delete shift:=xlUp
i = i - 1
End If
i = i + 1
Loop
End Sub