Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012
    Thanked 0 Times in 0 Posts

    Error meesage if Report Stops


    I have created a workbook that generates reports. When the program runs there can be 600 reports that are created. It takes anywhere from 7-8 hours to create all reports.

    I have noticed that sometimes during the run excel will freeze or stop, is there a way to build into the code that if the program freezes or stops any error message will appear to say the report number it stopped at.... example Message: Report stoped at Report 1111.


  2. #2
    5 Star Lounger
    Join Date
    Jan 2004
    Thanked 105 Times in 90 Posts
    Clearly, if Excel is failing, you have to record things BEFORE the failure occurs as Excel cannot do anything afterwards.

    So, for instance, add something to your code which, each time a report is completed:

    1. Writes the report number into a particular cell.
    2. Saves the workbook.

    Then, when you re-open the workbook, you can see which reports were completed by examining the chosen cell.

    If you don't want to keep saving the whole workbook, create a new one and write to a cell in that - and again save it after every report, as above.

    Are the reports created IN the workbook ?

    If "yes", then saving it after each report is created will let you see which were created.

    If "no", then can you not look and see which have been created ?
    Last edited by MartinM; 2012-06-19 at 04:34.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts