Run-time error 91 keeps popping up when i try manually amending/typing other columns which are not included in the macro code. How do I automatically bypass error-91 when this occurs rather than selecting end each time. My code is:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("E6:Q40"), Target).Count = 0 Then Exit Sub
If Application.WorksheetFunction.CountA(Range(Cells(8, Target.Column), Cells(40, Target.Column))) > 8 Then
MsgBox ("This slot is now full, please pick another date")
Target.ClearContents
End If
End Sub
Bookmarks