View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gulli Gulli is offline
external usenet poster
 
Posts: 6
Default How to create a comboboxhandler

Hi,
in MsExcel Help I found a description to create a ComboBoxHandler (
searching for "change event". But code is not functional. ComboBoxHandler is
an unknown Type :

Private ctlComboBoxHandler As New ComboBoxHandler
Sub AddComboBox()

Set HostApp = Application

Dim newBar As Office.CommandBar
Set newBar = HostApp.CommandBars.Add(Name:="Test CommandBar",
Temporary:=True)
Dim newCombo As Office.CommandBarComboBox
Set newCombo = newBar.Controls.Add(msoControlComboBox)
With newCombo
.AddItem "First Class", 1
.AddItem "Business Class", 2
.AddItem "Coach Class", 3
.AddItem "Standby", 4
.DropDownLines = 5
.DropDownWidth = 75
.ListHeaderCount = 0
End With
ctlComboBoxHandler.SyncBox newCombo
newBar.Visible = True


End Sub

Does anybody know, which library is containing that control ?

Thanks in advance
Gulli