L
Les Stout
Hi all, i am using the code below and it is not working as i want it to,
could somebody please help me ??
When i want to run this i am in the sheet Recon and it counts the rows
in recon ??
Sub DeleteInvoice()
'
Dim i As Long, iLastRow As Long
Dim myInv As String
myInv = InputBox("PLease enter the number of the invoice to
delete...", "DELETE INVOICE", "024908")
With Sheets("Invoices")
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Value = myInv Then
Rows(i).Delete
End If
Next i
End With
End Sub
Les Stout
*** Sent via Developersdex http://www.developersdex.com ***
could somebody please help me ??
When i want to run this i am in the sheet Recon and it counts the rows
in recon ??
Sub DeleteInvoice()
'
Dim i As Long, iLastRow As Long
Dim myInv As String
myInv = InputBox("PLease enter the number of the invoice to
delete...", "DELETE INVOICE", "024908")
With Sheets("Invoices")
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Value = myInv Then
Rows(i).Delete
End If
Next i
End With
End Sub
Les Stout
*** Sent via Developersdex http://www.developersdex.com ***