Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have a pop-up (right-click) menu that I'm creating on the fly based on what object my user right-clicks on, and everything seems to be working ok except that when I add a control of type msocontrolcombobox, I can't trap the _change event. I have a class module for the menu with several Private WithEvents commandbarbuttons that are working, followed by : Private WithEvents btnSetTarget As CommandBarComboBox Private Sub btnSetTarget_Change(ByVal Ctrl As Office.CommandBarComboBox) Debug.Print Ctrl.Text (I'd like to put more substatial code here) End Sub and in the code to show the pop-up: public sub ShowMenu() With Application.CommandBars.Add( Position:=msoBarPopup) .... other buttons defined .... Set btnSetTarget = .Controls.Add(Type:=msoControlComboBox) With btnSetTarget .AddItem "1%", 1 .AddItem "2%", 2 .AddItem "3%", 3 .AddItem "5%", 4 .Width = 120 .Caption = "Set '" & mAxis.AxisTitle.Caption & "' Target" End With .ShowPopup .Delete End With End Sub As I said up above, my other buttons work fine - the click event occurs between the .showpopup and .delete lines in the code above. However, for btnSetTarget, the change event doesn't seem to trigger. What's wrong? TIA. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stoppoing ComboBox Change Event from firing when Multipage changes | Excel Programming | |||
Worksheet change event not firing | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming | |||
Change minimumscale with the change event of a combobox | Excel Programming | |||
combobox change | Excel Programming |