Combobox change event

A

Andreas

Hi,

I have a problem with a CommandBarComboBox in a word commandbar.
the change event dosnt fire in other open documents than the first one.

I'm using vb.net, for this addin.

I create them like this.

Private _MyToolbar As CommandBar
Private WithEvents cbMyCombobox As CommandBarComboBox

...
_MyToolbar = _ApplicationObject.CommandBars.Add("MyToolbar", , , True)
....

cbMyCombobox = _MyToolbar.Controls.Add(MsoControlType.msoControlDropdown)

With cbMyCombobox
.Tag = "cbMyCombobox"
.Style = MsoComboStyle.msoComboNormal
.Enabled = True
End With
....
AddHandler cbMyCombobox.Change, AddressOf Me.cbMyCombobox_Change
....

Private Sub cbMyCombobox_Change(ByVal Ctrl As
Microsoft.Office.Core.CommandBarComboBox)
...
end sub

does anyone know how to solve this problem?

Andreas
 

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