sbuster

I'm trying to attach a simple event handler to a CommandBarButton and it' when I run my example the event is never triggered. Is there something I need to do outside of assigning a Click event handler



Re: Visual Studio Tools for Office Event Handlers not working

Cindy Meister

The most common reason for this is that you've not declared the button object variable at the class level, so it goes out of scope and is eventually garbage collected.

If that's not the problem in your case, you need to provide more information.

1. Type of project: VSTO, WinForms, Addin

2. Show the code you use for instantiating and creating the button

3. With which Office application (including version) are you working






Re: Visual Studio Tools for Office Event Handlers not working

Mike Morton - MSFT

sbuster, were you able to get your issue resolved with Cindy's suggestion

Mike





Re: Visual Studio Tools for Office Event Handlers not working

Andrew Whitechapel - MSFT

Cindy's advice was correct. I'm assuming the original poster has resolved the issue, as there has been no response for a long time.