Form close crashes Excel 2007

Add-in Express™ Support Service
That's what is more important than anything else

Form close crashes Excel 2007
 
Scott Johnston




Posts: 31
Joined: 2006-07-18
I have a modal form being loaded from an add-in for Excel 2007 via a ribbon tab button click using Form.ShowDialog. This works OK the first time I load and close. However if I show the form again and close it Excel crashes. I am using VB.Net 2003.



' Inside the button click event...
dim frm as new frmMain
frm.showdialog
frm.dispose

' Inside the frmMain close button click...
me.close



Has anyone had the same problem?
Is there a simple example of using forms with Excel add-ins that I can see that shows the correct way to do things?

I'm obviously missing something fundamental here...
Posted 05 Jun, 2007 16:24:55 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Scott.

Does the form contain any controls?


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 06 Jun, 2007 08:39:32 Top
Scott Johnston




Posts: 31
Joined: 2006-07-18
Sergey,

My original form did and I thought this might be the problem. However I set up a simple form with a close button on it and this shows the same behaviour...
Posted 06 Jun, 2007 09:04:55 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Scott, I can't reproduce the issue on my PC.
Please send me the code and I will test it.
Posted 06 Jun, 2007 10:04:04 Top
Scott Johnston




Posts: 31
Joined: 2006-07-18
Sergey,

It's awkward as the solution contains references to third party controls etc. Some of the code also belongs to a client.

By the sounds of it the form or Add-in solution in question may have become corrupted if you can't reproduce the crash...
Posted 07 Jun, 2007 02:40:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Scott, you could send me a simple project that exposes the issue.
Posted 07 Jun, 2007 08:24:31 Top
Scott Johnston




Posts: 31
Joined: 2006-07-18
Sergey,

I have created another Add-in from scratch with a simple ribbon button. The form shows and closes OK. No crash!

Looks like the original solution has become corrupted some how.

I think I'm going to have to start with a clean solution and rework from the beginning...

:cry:

Regards

Scott
Posted 11 Jun, 2007 15:35:41 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Scott.

Please let me know if you face any other difficulties.
Posted 12 Jun, 2007 09:23:09 Top