Just before the end of each iteration, add these green line

Code:
        If pvt.DataBodyRange.Rows.Count < 2 Then
            pvt.TableRange1.EntireRow.Delete
        End If
    Next lngPivots