Hi, I am creating the following vba, aims for deleting 0 value only in the range P7:P208, but the vba is also deleting any number containing 0 such as 10, 20, 30 and so on.
Kindly please help to correct the VBA.
Private Sub CommandButton3_Click()
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("P7:P208", ActiveSheet.Range("P208").End(xlDown))
Do
Set c = SrchRng.Find("0", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
Txs Halim
Kindly please help to correct the VBA.
Private Sub CommandButton3_Click()
Dim c As Range
Dim SrchRng
Set SrchRng = ActiveSheet.Range("P7:P208", ActiveSheet.Range("P208").End(xlDown))
Do
Set c = SrchRng.Find("0", LookIn:=xlValues)
If Not c Is Nothing Then c.EntireRow.Delete
Loop While Not c Is Nothing
End Sub
Txs Halim