+ Reply to Thread
Results 1 to 3 of 3

Error Handling in a loop

  1. #1
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Error Handling in a loop

    I have a loop that when there is an error it will record the workbook name and all its info in another workbook then move on to the next workbook. This all works great. the problem is the next time it loops though it steps through my error code even though there is no error I thought I would be clever and check the error code but the error code never goes back to 0 so if it's 1004 the next time I check it its 1004 any help would be great.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,332

    Re: Error Handling in a loop

    I can't see a loop there but you can use Err.Clear to clear the current error.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    09-21-2012
    Location
    illinois
    MS-Off Ver
    Excel 2010
    Posts
    242

    Re: Error Handling in a loop

    That's what I needed. Thankyou

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Using Error handling within a Loop
    By uniquelydeep in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-30-2013, 03:41 PM
  2. Error Handling in a Loop
    By amdk8800 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-28-2013, 03:46 PM
  3. [SOLVED] Error Handling in loop - go to next x
    By Phiabell in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-04-2013, 09:30 AM
  4. Error handling within a Do Loop
    By Boondoggler in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-01-2012, 12:15 AM
  5. Error handling within loop
    By DesignMind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2009, 01:51 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