Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default How to prevent the MS Excel error dialog by errorhandling ?

I am building a MS Excel application which uses a VB ActiveX dll. In order
to handle unexpected errors, I've added 'on error goto errorhandler' both in
the routines in the dll as well as in the subroutines in the Excel VBE.
However in some unpredictable cases MS Excel fires an error by which the
following Excel dialog appears :

An error has appeared in MS Excel and has to be closed. We offer our
apologizes for this unconvenience....and asks for sending the report to MS.
After closing this form, Excel is also closed and the whole thing has to be
started again. Since the problem doesn't occur all the time even after
performing the same steps this must be due to Excel and I am not able to
solve this. I was wondering whether there is a kind of errorhandling or
setting other than I've described above which can trap the Excel error so
that Excel would not be closed automatically.

Oscar


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default How to prevent the MS Excel error dialog by errorhandling ?

Hi Oscar,

No, this is an unhandled application error, and you can't trap it. You'll
have to figure out what bit of code is causing Excel to crash and work
around it. Sometimes adding a few DoEvents statements to the offending bit
of code will take care of issues like this. If you look up the actual error
code on the MS site, you may find bug-related information.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Oscar wrote:
I am building a MS Excel application which uses a VB ActiveX dll. In
order to handle unexpected errors, I've added 'on error goto
errorhandler' both in the routines in the dll as well as in the
subroutines in the Excel VBE. However in some unpredictable cases MS
Excel fires an error by which the following Excel dialog appears :

An error has appeared in MS Excel and has to be closed. We offer our
apologizes for this unconvenience....and asks for sending the report
to MS. After closing this form, Excel is also closed and the whole
thing has to be started again. Since the problem doesn't occur all
the time even after performing the same steps this must be due to
Excel and I am not able to solve this. I was wondering whether there
is a kind of errorhandling or setting other than I've described above
which can trap the Excel error so that Excel would not be closed
automatically.

Oscar


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
prevent div/0 error Austin[_2_] Excel Worksheet Functions 2 March 15th 10 05:37 AM
Error dialog box meaning and how to find error Jeanne Excel Worksheet Functions 2 September 4th 08 04:59 AM
Excel Spreadsheet Not Saved Dialog Error KNETTEK Excel Discussion (Misc queries) 0 June 3rd 06 12:14 AM
Common Dialog Error Clement Excel Programming 1 November 19th 03 12:10 PM
Prevent dialog - Prevents Sending Excel File From Outlook JP[_7_] Excel Programming 7 August 18th 03 06:25 PM


All times are GMT +1. The time now is 07:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"