+ Reply to Thread
Results 1 to 3 of 3

Continue if fail

  1. #1
    Registered User
    Join Date
    12-24-2018
    Location
    NC, US
    MS-Off Ver
    office 2016
    Posts
    12

    Continue if fail

    Hello - I am seeking help on likely a minor adjustment I'd like to make. I am creating a macro that will expand my details by removing filters, or alternatively in a separate macro, apply a specific filter, both on various sheets. However, being as that this is a working file - sometimes someone may forget and leave a filter applied on one but not the other. When running the macro it fails at the point in which the first sheet didn't comply. Is there a way to edit this macro making it continue on to complete the process if it were to fail.

    Here is an example of the current macro -

    Sub ExpandScheduleDetailsv2()
    '
    ' ExpandScheduleDetailsv2 Macro
    '

    '
    Sheets("Sch 2").Select
    ActiveSheet.ShowAllData
    Sheets("Sch 3").Select
    ActiveSheet.ShowAllData
    Sheets("Sch 5 (detail)").Select
    ActiveSheet.ShowAllData
    Sheets("Schedule 6").Select
    ActiveSheet.ShowAllData
    Sheets("Sch 7(detail) ").Select
    ActiveSheet.ShowAllData
    Sheets("Sch 11(FLEETCOR credit)").Select
    ActiveSheet.ShowAllData
    Sheets("Distributor Return Cover Sheet").Select
    End Sub

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,293

    Re: Continue if fail

    Try:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,293

    Re: Continue if fail

    Please note ...

    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

+ 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. IF not over a certain% than Fail
    By jklangenberg in forum Excel General
    Replies: 3
    Last Post: 09-27-2017, 12:50 PM
  2. How to make a cell display "FAIL" when range of cells is FAIL
    By crazychile in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2017, 04:13 PM
  3. vba to add new row and continue new #
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-21-2013, 03:42 PM
  4. [SOLVED] Need a formula for pass/fail based on no. of Y answers but automatically fail if 3a is N
    By Researcher1111 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-15-2013, 10:20 PM
  5. [SOLVED] to continue down in the same row
    By alex178 in forum Excel General
    Replies: 2
    Last Post: 07-08-2006, 12:40 PM
  6. Continue
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2006, 01:55 PM
  7. [SOLVED] why does this fail?
    By Gixxer_J_97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2005, 08:06 AM

Tags for this Thread

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