J
jkampfe
I have an application that creates a command bar combobox in Excel with about
4800 items. I have been running this application for years without a problem
under Excel 2000 or 2003. When running it in 2007 the ComboBox will not
display more than 1000 items. Running a debug trace shows everything to be
behaving normally. Items are added to the list using a For/Next loop without
error and the ListCount property shows the correct number of items (4821 to
be exact) but only the first 1000 items are displayed. Has anyone come
across this? Any help would be appreciated. Thanks.
James Kampfe
Here is the section of code used to populate the ComboBox:
Dim RouterListBox As CommandBarControl
Set RouterListBox = CommandBars("EstimateToolbar").Controls.Add _
(Type:=msoControlComboBox)
With RouterListBox
.Caption = "Router"
.OnAction = "PasteRouter"
.Style = msoComboNormal
.Width = 200
.BeginGroup = True
.TooltipText = "Select a Router Number"
For x = 0 To RouterCount
.AddItem ActiveCell.Offset(x, 0).Value
Next x
.ListIndex = 0
End With
4800 items. I have been running this application for years without a problem
under Excel 2000 or 2003. When running it in 2007 the ComboBox will not
display more than 1000 items. Running a debug trace shows everything to be
behaving normally. Items are added to the list using a For/Next loop without
error and the ListCount property shows the correct number of items (4821 to
be exact) but only the first 1000 items are displayed. Has anyone come
across this? Any help would be appreciated. Thanks.
James Kampfe
Here is the section of code used to populate the ComboBox:
Dim RouterListBox As CommandBarControl
Set RouterListBox = CommandBars("EstimateToolbar").Controls.Add _
(Type:=msoControlComboBox)
With RouterListBox
.Caption = "Router"
.OnAction = "PasteRouter"
.Style = msoComboNormal
.Width = 200
.BeginGroup = True
.TooltipText = "Select a Router Number"
For x = 0 To RouterCount
.AddItem ActiveCell.Offset(x, 0).Value
Next x
.ListIndex = 0
End With