combobox list length???

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771
is there any way to set the length of a list in a combo box...... i have 30 scenarios that are supposed to be populating my combobox but for some reason only 24 will show up.... any ideas????
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771
I have gone into properties and looked around quite abit but i cant find anything in there that would indicate list length...... is there code that can adjust this???
 

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771
SORRY FOR THE BUMP........ can anyone tell me at least if 24 is the default value for the amount of lines in a combobox list????

and if there is any way to change that i would love to know
 

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771

ADVERTISEMENT

THE list rows property is how many rows of data you see at once when you click on the arrow..... but what i need to know is how many can i get in the main list
 

Tazguy37

MrExcel MVP
Joined
May 28, 2004
Messages
4,237
I see that now. I'm not really a controls fan (I prefer validation).

Since the indeces for the List property have to be integers, I'd say that you're looking at a max of 32,768 values, one more than Excel's maximum integer. At least in Excel 2000. However, I couldn't get any values to display. It works with 16,384, though.
 

d0wnt0wn

Well-known Member
Joined
Oct 28, 2002
Messages
771
WELL I played around with it for a bit and came up with this..... for some reason no matter what i did.. the combo box would only pick up my first 24 scenarios but i needed 30......

I adjusted the code like this.

Option Explicit

Private Sub WORKBOOK_OPEN()
Dim i As Long
Application.ScreenUpdating = False
Sheets("flat estimates").Activate
Sheets("flat estimates").ComboBox1.Clear
Sheets("flat estimates").ComboBox1.AddItem "--Choose Estimate Type--"
For i = 1 To Sheets("flat estimates").Scenarios.Count
Sheets("flat estimates").ComboBox1.AddItem Sheets("flat estimates").Scenarios(i).Name
Next
Sheets("flat estimates").ComboBox1.ListIndex = 0
Application.ScreenUpdating = True
Sheets("flat estimates").Range("B10:B21").ClearContents

Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("shingle estimates").Activate
Sheets("shingle estimates").ComboBox2.Clear

Sheets("shingle estimates").ComboBox2.AddItem "--Choose Estimate Type--"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 6/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 7-10/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 10/12 UP INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 6/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 7-10/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 1 LAYER RIP 10/12 UP PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER RIP 6/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER RIP 7-10/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER RIP 10/12 UP INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER 6/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER 7-10/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "SHINGLE 2 LAYER 10/12 UP PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 6/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 7-10/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 10/12 UP INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 6/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 7-10/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION 10/12 UP PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 6/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 7-10/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 10/12 UP INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 6/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 7-10/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 1 10/12 UP PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 6/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 7-10/12 INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 10/12 UP INTO BIN"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 6/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 7-10/12 PACKOUT"
Sheets("shingle estimates").ComboBox2.AddItem "CEDAR CONVERSION + 2 10/12 UP PACKOUT"

For i = 1 To Sheets("flat estimates").Scenarios.Count

Next

Sheets("shingle estimates").ComboBox2.ListIndex = 0
Application.ScreenUpdating = True
Sheets("shingle estimates").Range("B16:B27").ClearContents

Application.ScreenUpdating = True
ARBUTUS.show
End Sub
 

Forum statistics

Threads
1,147,508
Messages
5,741,572
Members
423,668
Latest member
Audorin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top