or yet even another way
Code:
Option Explicit
Sub runMacro()
Call DeleteRowswithValue(Cells(1, 1), 0)
End Sub
Sub DeleteRowswithValue(rngColumn As Range, iValue As Integer)
Dim rngActive As Range
Dim bFoundCell As Boolean
'initalise bfoundcell
bFoundCell = True
Do Until Not bFoundCell
'attempt to find the value
Set rngActive = rngColumn.EntireColumn.Find(what:=iValue, lookat:=xlWhole)
If Not rngActive Is Nothing Then
rngActive.EntireRow.Delete
Else
bFoundCell = False
End If
Loop
Set rngfoundcell = Nothing
End Sub
btw piere your method will fail if there is a blank value in the cell.
Also i would advice strongly against using select or selections if at all possible.
There are loads of ways to do this but shades has given a good answer if there is a limit on the amount of data
Thanks
David