Results 1 to 11 of 11

Handling error in VBA

Threaded View

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Handling error in VBA

    Hello everyone

    When I am using this line [On Error GoTo ErrHandler] to navigate to a specific point

    ErrHandler:
                If Err Then On Error GoTo 0: Err.Clear: Debug.Print sFileName
                sFileName = Dir
    I can move into the point just once but if the error occurs again, I got an error and the code stops. How can I make the code moves the point `ErrHandler` every time the error occurs?

    The question posted here too
    https://eileenslounge.com/viewtopic.php?f=30&t=39437
    Last edited by YasserKhalil; 03-16-2023 at 02:04 PM.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Error Handling: Need simple code for Run-time Error
    By romsky26 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2021, 08:59 AM
  2. [SOLVED] Odd Error Handling Behaviour; goes to error handler even when no error?
    By kalikj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-04-2018, 10:04 AM
  3. Error handling inside error handling
    By grantastley in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2015, 03:43 AM
  4. [SOLVED] Error Handling: Creating code to display error messages
    By Student1990 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-01-2013, 02:21 PM
  5. Error Handling: Can it report line # where error occurred?
    By PingPing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2010, 03:47 AM
  6. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM
  7. Error handling with a handling routine
    By ben in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2005, 11:06 AM

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