+ Reply to Thread
Results 1 to 6 of 6

Using Mutiple Error Handlers for Same Error Number

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Using Mutiple Error Handlers for Same Error Number

    Hi all in correlation to my previous post, I maybe able to delete my query link
    through few error checks. However,I'm not real sure how to set this up.

    Here's my attempt to handle different existing conditions for the same error. I don't
    think it is stepping through the code for each error handler they way I intended.

    Please Login or Register  to view this content.
    Any help is appreciated.

    Thanks,

    BDB

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using Mutipl Error Handlers for Same Error Number

    Why start a new post if it isn't solved? At least post a link to the previous post!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Using Mutiple Error Handlers for Same Error Number

    Roy, I wanted this thread to be treated as a different problem/issue. This post is focused on dealing with handling multiple error handlers for the same error number (regardless of the error code #). I'm needing to fix this code so if it jumps into an error handler and the set of commands proceeding do not handle the error, then it will step to another error handler and run it's set of commands. I want to setup a chain of different conditions that it can run through until it finds a set of commands that will match the number of conditions that's causing the error.

    I only wanted to reference this to the other post because the code I've put in this post show the same QueryTables that I'm trying to delete.

    If this helps here's a link to my other thread.

    http://www.excelforum.com/excel-prog...-wildcard.html

    Thanks for any help in resolving either problem.

    BDB

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Using Mutiple Error Handlers for Same Error Number

    I've thought maybe something like this would work but I'm getting a

    Compile Error:
    Invalid or unqualified refernence

    for what's highlighted
    Please Login or Register  to view this content.
    BDB

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using Mutiple Error Handlers for Same Error Number

    I have no idea what you're trying to do, but the proximate problem is that you have an End With statement, and then continuue to make reference to .QueryTables.

    Suggest you get and use SmartIndenter, which make problems like this visually obvious:
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Using Mutiple Error Handlers for Same Error Number

    SHG,

    After my last reply, I diddiscover my missing "End With". Sorry, I wasn't able to update my finding and correction there after.

    What I'm trying to do is build some code which will delete all possible links (ie:.QueryTables("IN Stock Status Report - 6896_*.IRP").

    Each time I update my sheet from it's external sourceI an active querry table link gets placed into the page. The only reason I know this, is because, when I try to build a filter list on the sheet, I get a message that the link has to be removed in order for me to add the list. I found through macro recording my manual removal that the number of links can vary each time.

    Basically what I'm trying to do is check and remove all active querry table links from my worksheet using a loop or error checking method. The code needs to step through
    various scenarios. I don't there are more than 3 or 4 different possible links that need to be removed before a list can be genereated. The inherited problem is if it runs through an
    delete instruction and that link does not exist than the code will error. I need to be able to
    clear that error and have it continue checking and deleting the remaining possible links until all link have been removed.

    HTH's.

    BDB
    Last edited by bdb1974; 02-16-2010 at 11:22 AM.

+ 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