Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AddIn - Frustration?

2 views
Skip to first unread message

Peter

unread,
Mar 8, 2004, 8:31:10 AM3/8/04
to
Hello,

I am puzzled. I have written a shared sample AddIn in C# for Excel which creates its own menu. I select an item from the AddIn menu and it will bring up a dialog which loads some data from a database into a list box. Everything works fine. Here is where I am puzzled. If I now close the dialog and then go back to the shared AddIn menu and select the same item, nothing happens. My dialog does not come up. In fact, Excel seems to be ignoring my AddIn from that point forward. I have put break points in my program and it seems that Excel didn't like something and is ignoring my addin. When I close Excel down and restart it, I get the same behaviour. I checked the registry and the Loadbehaviour is still 3. Any Ideas?

Many Thanks
Peter

Siew Moi Khor [MS]

unread,
Mar 9, 2004, 2:12:45 AM3/9/04
to
Hi Peter,
Without more info\code it's hard to tell. But the most common problem i see
when this happens is that the scope of a reference is local to a method when
it should be made into a class field. If it's local to a method, when it
goes out of scope, the managed object will get GC-ed, when that kicks in.

>>>When I close Excel down and restart it, I get the same behaviour.

Check if your add-in has been disabled:
In Excel, click Help ---> About MS Excel --> click Disable Items to see if
your add-ins is listed there. You can re-able it from there if it's listed.

Siew Moi
---
This posting is provided 'AS IS' with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm


"Peter" <anon...@discussions.microsoft.com> wrote in message
news:385305FA-4D80-4A73...@microsoft.com...

0 new messages