+ Reply to Thread
Results 1 to 5 of 5

Error 1004 impossible to capture with On Error go To

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Barcelona
    MS-Off Ver
    Excel 2007
    Posts
    74

    Error 1004 impossible to capture with On Error go To

    Hello,

    I have the following code:

    Please Login or Register  to view this content.
    The fact is that sometimes the pivot table hasn't the element I am trying to use as a filter, so I want to stop the filtering and capture the error with On Error Go To, but the code still shows the 1004 error and does not show my message box.
    Last edited by RagonichaFulva; 03-20-2012 at 12:10 PM.

  2. #2
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Error 1004 impossible to capture with On Error go To

    If the pivot table doesnt have the element you are trying to use as filter I think that the line
    Please Login or Register  to view this content.
    will give back error. If this is the case, then the On Error statement needs to go before it:

    Please Login or Register  to view this content.
    Try it like that and get back please

    I hope that helps.

  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Barcelona
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Error 1004 impossible to capture with On Error go To

    Quote Originally Posted by Pichingualas View Post
    If the pivot table doesnt have the element you are trying to use as filter I think that the line
    Please Login or Register  to view this content.
    will give back error. If this is the case, then the On Error statement needs to go before it:

    Please Login or Register  to view this content.
    Try it like that and get back please

    I hope that helps.
    Back error... that's right. I ignored that. Thanks for your help, that worked perfectly.

    +1

  4. #4
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: Error 1004 impossible to capture with On Error go To

    Awesome

  5. #5
    Registered User
    Join Date
    11-28-2011
    Location
    Barcelona
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Error 1004 impossible to capture with On Error go To

    Hello,

    I have re-tested the code again and I have discovered that it ALWAYS prompts the ERROR control. What is more, now the code is quite slow...

    Here's my code:

    Please Login or Register  to view this content.

+ 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