+ Reply to Thread
Results 1 to 6 of 6

On Error GoTo - something crashes

  1. #1
    Registered User
    Join Date
    11-18-2013
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    31

    On Error GoTo - something crashes

    I have written a long code, creating 5 different pivots, though If some data did not appear in specified period I would like to ommit this table.

    Therefore I have created a code in type of



    Please Login or Register  to view this content.
    (5 loops this way^^)

    Though it does freeze after filtering with KM at first.

    The purpose was to skip 1 pivot if unable to filter with criteria.

    Could you help me out?

  2. #2
    Registered User
    Join Date
    11-18-2013
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: On Error GoTo - something crashes

    about to fall off the page, so dragging up

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: On Error GoTo - something crashes

    Why not test to see if the relevant data exists in the pivot table, or source data, before trying to set the current page?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    11-18-2013
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: On Error GoTo - something crashes

    Did not work much with "Find" in VBA..

    Would be much better though

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: On Error GoTo - something crashes

    Have you tried using COUNTIF or another worksheet formula via Application.WorksheetFunction?

  6. #6
    Registered User
    Join Date
    11-18-2013
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: On Error GoTo - something crashes

    You sir are much helpful!

    TYVM! Worked

+ 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] Error Occurs while running to On Error Goto Line3
    By moinsk21 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-01-2014, 02:37 PM
  2. on error goto
    By RBI in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2008, 11:42 AM
  3. Run-time error '91' when 'On error goto' and cells.find
    By bjoern in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2008, 07:27 PM
  4. On Error Goto (Global Error Handling)
    By mpeplow in forum Excel General
    Replies: 3
    Last Post: 04-10-2007, 11:33 PM
  5. 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

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