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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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???
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,207
Members
448,554
Latest member
Gleisner2

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
Back
Top