+ Reply to Thread
Results 1 to 5 of 5

How to send "F5" key on error to Continue

  1. #1
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Question How to send "F5" key on error to Continue

    I have the following code in my excel workbook that is used to pull in a chart when running a report:

    Please Login or Register  to view this content.
    The code works great Most of the time, but occasionally fails at the line Highlighted in the attached file. In order to proceed, all I have to do is click inside the VB code window on Run, then choose to Continue (F5) and the code proceeds without more errors and displays the report with the charts.

    The Error message is Run-time error '2137221040 (800401d0), The specified dimension is not valid for the current chart type. I have researched these errors, but have not found a solution


    I have been looking for a way to capture this error and then force it to continue, but all I see is ways to capture and then force 'Next' which skips the line of code where the error occurs. I do not want to do that.

    If anyone knows of a way to 'Continue' in vba on error, or any other suggests, it would be greatly appreciated. Perhaps I am not understanding the error code procedure correctly.... Help Please!
    Attached Images Attached Images

  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
    44,420

    Re: How to send "F5" key on error to Continue

    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 Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Re: How to send "F5" key on error to Continue

    Thanks TMS. this seems to be working. Apparently as suspected, I do not have a good understanding of error handling.

    I am going to do some more extensive testing before making this "Resolved".

    Thanks again.

  4. #4
    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
    44,420

    Re: How to send "F5" key on error to Continue

    You're welcome.


    When you are ready …

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  5. #5
    Forum Contributor
    Join Date
    01-08-2017
    Location
    Salt Lake City, Ut.
    MS-Off Ver
    2019 and 365
    Posts
    135

    Re: How to send "F5" key on error to Continue

    Thanks TMS, marked as Solved

+ 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] Continue code after input password without "Ok" or "Enter"
    By scallebe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2018, 05:01 PM
  2. Send mail via Outlook component returns error 429 - "can't create object"
    By marksten in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 06-08-2018, 08:59 AM
  3. Replies: 0
    Last Post: 11-06-2013, 04:37 PM
  4. Excel 2010 (Run-time error '13' type mismatch) "Debug" and "Continue" Grayed out.
    By Jeronimo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2012, 06:42 PM
  5. Code to continue after "Fatal Error"
    By chachie22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2011, 12:53 PM
  6. Automatically click "Update Links" & "Continue"
    By paulharvey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2006, 12:35 PM
  7. [SOLVED] How do I replace "#N/A" error, to continue my formula w/o error?
    By Ali Khan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-20-2006, 11:55 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