Re: Excel COM Add-In in C# 2003.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Jako Menkveld" <jako@xxxxxxxxxxxxxxxx> wrote in message
news:Oh5Rxgt5FHA.1276@xxxxxxxxxxxxxxxxxxxxxxx
> 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...


.


Quantcast