Hi All,
The following code has been running absolutely fine for quite some time, then this morning it fell over with no apparent changes.
Can anyone help?
It seems to be falling over on the line "End If"
Thanks in advance
Sub DeleteSatSun()
Sheets("PROCESS").Activate
Dim currentrow As Long
Dim usedrows As range
On Error GoTo abort
Set usedrows = ActiveSheet.UsedRange.rows
For currentrow = usedrows.rows.count To 1 Step -1
If Int(Application.WorksheetFunction.Weekday(usedrows.rows(currentrow).Columns("A:A"))) Mod 7 < 2 Then
usedrows.rows(currentrow).EntireRow.Delete
End If
Next currentrow
abort:
End Sub
Bookmarks