View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Otto Otto is offline
external usenet poster
 
Posts: 11
Default VSTO Excel Crashes in Debug

All of my experience is with VSTO 2003.

Open Excel, go to help/About MS Excel.
In the About window, there is a "Disabled Items" button in the lower right
corner.
Pressing it will get you a list of problem office docs. You can re-enable
them from here.

This may fix your problem. You may also want to check the Task Manager for
more than 1 instance of excel.exe. This may be part of the problem too.

In addition, VSTO handles errors in a strange way. If your code throws an
exception, execution stops and returns to the document, with no indication of
an error. When in doubt, put a try/catch block around all code that
interfaces with document objects. Use the Debug.Writeline() method to give
you an idea what the problem is.

VSTO is a quantum leap over VBA (even in C#), but it takes some getting used
to.


"Bob Sullentrup" wrote:

Folks,

I created a new VSTO Excel project, put a MessageBox in the WB_Open event,
and hit the 'Debug'. Excel tried to load, then went south.

When I open the workbook outside of .NET, the workbook opens and the
MessageBox appears.

What might be causing Excel to crash in VSTO?

--
Bob Sullentrup