I need to handle CommandBarComboBox_Change Event in my code

H

Huang

I need to handle CommandBarComboBox_Change Event in my code

Dim applicationCommandBars As CommandBars
Dim currentCommandBar As CommandBar
Dim WithEvents cbEdit As CommandBarComboBox
.......
.......
cbEdit =
currentCommandBar.Controls.Add(MsoControlType.msoControlEdit)
cbEdit.BeginGroup = True
' Clear the text and show a caption.
cbEdit.Text = ""
cbEdit.Caption = "Enter your name:"
cbEdit.Style = MsoComboStyle.msoComboLabel
.......
Private Sub cbEdit_Change(ByVal Ctrl As CommandBarComboBox) _
Handles cbEdit.Change
MessageBox.Show("oEdit_Change event fired -- Player's
name = " + Ctrl.Text)
End Sub

but it doesn't work in my COM Addin.
A Button_Click event works fine. Any ideas?
 

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