+ Reply to Thread
Results 1 to 3 of 3

How to change an event handler on error

  1. #1
    Registered User
    Join Date
    08-17-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    How to change an event handler on error

    Hi all
    I've tried to read up on some error handling but everything I've brought up just confuses me more.
    I got some code that sets the event handler to false so that the code can run uninterrupted.
    Please Login or Register  to view this content.
    Unfortunately, I got some problems where I run into errors when pasting blocks of information (works fine on single cells). When that happens it leaves the event handler as false as it hasn't reached the code to enable it again. So I have to manually go and enable it again. This is fine for me, but the users won't know how to do that. While I figure out how to correct my mistakes, is there a way of running a line of code if an error happens? Or does anyone know a Error Handling for Dummies site?
    Thanks
    Alan
    Last edited by alanb1976; 02-08-2012 at 08:07 AM.

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: How to change an event handler on error

    Hi
    This is nice article about basic error handling.

    http://www.cpearson.com/Excel/ErrorHandling.htm

    You need an error handler where you will change EnableEvents property to TRUE

    Hope it helps
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Registered User
    Join Date
    08-17-2011
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: How to change an event handler on error

    Thanks. That is a lot simpler explanation to the previous ones I read

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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