Excel COM Add-In in C# 2003.

J

Jako Menkveld

I'm writing a COM Add-In for Excel (2003) using C# (VS.NET 2003). The
Add-In loads fine in Excel and creates my menu items.

I have one menu item the open a Windows Form where the user can specify
settings, then click OK to close the form (I use the DialogResult property
at design-time). I use Form.ShowDialog() to show the form. This works fine
the first time I try it, but if I click the menu-button again, my
click-event doesn't fire.

Any ideas why this would happen?

Furthermore, the behaviour is not very consistent. On my dev PC it works
sometimes, but on another PC it never works.

Any suggestions as to where I can start looking for a solution?

Thanks
Jako Menkveld
 
J

Jako Menkveld

Jako Menkveld said:
I'm writing a COM Add-In for Excel (2003) using C# (VS.NET 2003). The
Add-In loads fine in Excel and creates my menu items.

I have one menu item the open a Windows Form where the user can specify
settings, then click OK to close the form (I use the DialogResult property
at design-time). I use Form.ShowDialog() to show the form. This works
fine the first time I try it, but if I click the menu-button again, my
click-event doesn't fire.

Any ideas why this would happen?

Furthermore, the behaviour is not very consistent. On my dev PC it works
sometimes, but on another PC it never works.

Any suggestions as to where I can start looking for a solution?

Thanks
Jako Menkveld


Ok, I've solved to problem. I need to keep a reference to the
CommandBarButton object I create. I did this and it seems to be working ok
now...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top