Hey, I have a worksheet which contains a different amount of rows used each time but i have dates set up already, once the data is inputed i need to run a macro which deletes all dates that are not used. I fill in data in Column B and i need to delete all rows when column B has a cell with null value, this is what i have:

Sub deletereturns()
'
'
'Deletes all rows which column B contains Null values.
Dim i As Long
With ActiveSheet
For i = .Range("B" & .Rows.Count).End(xlUp).Row To 2 Step -1
    If .Range("B" & i).Value = "" Then .Rows(i).Delete
Next
End With

End Sub
But this isnt working, can someone please help, thanks,