i want to build a macro that delete rows from a table in an excel sheet based on an if statement that runs on all the rows from row number 2 to the end of the table - if the value in row i and column B equals 0 i would like to delete the entire row.

this is the code i wrote but nothing happens when i run it 

```
Sub deleteZeroRows()

'loop for deleting zero rows
Dim wbCurrent As Workbook
Dim wsCurrent As Worksheet
Dim nLastCol, i As Integer

Set wbCurrent = ActiveWorkbook
Set wsCurrent = wbCurrent.ActiveSheet

Dim lastRow As Long

lastRow = Range("b2").End(xlDown).Select

For i = 2 To lastRow
    If wsCurrent.Cells(i, 2) = 0 Then
    wsCurrent.Cells(i, 2).EntireRow.Delete
    End If
Next i

End Sub 

```