Results 1 to 5 of 5

How to ignore run-time error 91

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    london,uk
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2307) 64-bit....Windows 10 Enterprise
    Posts
    118

    How to ignore run-time error 91

    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
    Last edited by chris1089; 12-20-2021 at 09:59 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 08-15-2020, 05:42 PM
  2. [SOLVED] Macro To IGNORE ERROR - Cell With Formula / Green Arrow Error
    By Logit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2018, 09:16 PM
  3. Add time but ignore period of time
    By botty1963 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-14-2016, 12:48 PM
  4. [SOLVED] On error, ignore error but show message box
    By chin67326 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2015, 07:54 PM
  5. Replies: 1
    Last Post: 09-20-2014, 03:49 PM
  6. Replies: 12
    Last Post: 07-04-2013, 07:26 AM
  7. [SOLVED] How to ignore and proceed on run time error 91
    By shammi_Raj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2013, 01:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1