+ Reply to Thread
Results 1 to 3 of 3

How do the experts pass an error up the call stack?

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    How do the experts pass an error up the call stack?

    When an unrecoverable error occurs in a level 3 sub() and the level 1 sub() set EnableEvents = False, how do the experts let VBA know that it needs to set EnableEvents = True? Or re-protect a sheet, or reset FreezePanes, etc when necessary?
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How do the experts pass an error up the call stack?

    you can raise a custom error that is not handled by any intermediate error handlers. or use functions that return error or success values
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How do the experts pass an error up the call stack?

    I had a thread that I suspected had crashed when events were disabled - I sent code to enable events but I don't think they did - two weeks of coding down the drain
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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