Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
Hi All,
I need to fill a combobox with data I have on a sheet called stock. The part numbers are in Column A. What I would like is populate with the correct amount. I assume if I used the whole column the combobox fill would be huge. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
On 21/03/2012 11:30 PM, Greg B wrote:
Hi All, I need to fill a combobox with data I have on a sheet called stock. The part numbers are in Column A. What I would like is populate with the correct amount. I assume if I used the whole column the combobox fill would be huge. Hi Greg Are you talking about a Userform Combobox or a Data Validation Dropdown List? Mick. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
userform sorry forgot that part
"Vacuum Sealed" wrote in message ond.com... On 21/03/2012 11:30 PM, Greg B wrote: Hi All, I need to fill a combobox with data I have on a sheet called stock. The part numbers are in Column A. What I would like is populate with the correct amount. I assume if I used the whole column the combobox fill would be huge. Hi Greg Are you talking about a Userform Combobox or a Data Validation Dropdown List? Mick. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
On 22/03/2012 12:06 AM, Greg B wrote:
userform sorry forgot that part "Vacuum wrote in message ond.com... On 21/03/2012 11:30 PM, Greg B wrote: Hi All, I need to fill a combobox with data I have on a sheet called stock. The part numbers are in Column A. What I would like is populate with the correct amount. I assume if I used the whole column the combobox fill would be huge. Hi Greg Are you talking about a Userform Combobox or a Data Validation Dropdown List? Mick. Hmm, sorry! that be my achille's heel in that I haven't had the need to do any Userform work thus have little knowledge in this area. Cheers Mick. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
Greg B expressed precisely :
Hi All, I need to fill a combobox with data I have on a sheet called stock. The part numbers are in Column A. What I would like is populate with the correct amount. I assume if I used the whole column the combobox fill would be huge. Explain what you mean by "the combobox fill would be huge". Are there duplicate part numbers or just lots of them? (I assume you don't want blanks!) Do you want to load the combobox with a specific number of items at a time and provide controls for stepping through all items by moving in next-in-line? Do you want a sorted list? Would a listbox possibly serve you better since users could simply click an item as apposed to opening the list and navigating it to select an item? (Note that a combobox will cycle through all entries that begin with the first letter typed, and so may be the better tool for the job at hand) -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc microsoft.public.vb.general.discussion |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
Assuming you know how to create a userform, this would be the code to populate it with items from Column A
'---------------------------------------- Private Sub CommandButton1_Click() Range("C1") = ComboBox1 Unload Me End Sub Private Sub UserForm_Initialize() Dim Rws As Long, Rng As Range Rws = Cells(Rows.Count, "A").End(xlUp).Row Set Rng = Range(Cells(2, 1), Cells(Rws, 1)) ComboBox1.List = Rng.Value End Sub '--------------------------------------------- Check this out to learn how to create a UserForm. Insert a combobox instead of a textbox in the example. http://www.davesexcel.com/createauserform.htm Here is an example http://www.davesexcel.com/Populate%2...0userform.xlsm |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combobox Population
Thank you for the answers.
Greg "davesexcel" wrote in message news:8064778.146.1332458365000.JavaMail.geo-discussion-forums@pbctp7... Assuming you know how to create a userform, this would be the code to populate it with items from Column A '---------------------------------------- Private Sub CommandButton1_Click() Range("C1") = ComboBox1 Unload Me End Sub Private Sub UserForm_Initialize() Dim Rws As Long, Rng As Range Rws = Cells(Rows.Count, "A").End(xlUp).Row Set Rng = Range(Cells(2, 1), Cells(Rws, 1)) ComboBox1.List = Rng.Value End Sub '--------------------------------------------- Check this out to learn how to create a UserForm. Insert a combobox instead of a textbox in the example. http://www.davesexcel.com/createauserform.htm Here is an example http://www.davesexcel.com/Populate%2...0userform.xlsm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
combobox population question | Excel Programming | |||
ComboBox Population | Excel Programming | |||
combobox population | Excel Programming | |||
Combobox Population | Excel Programming | |||
ComboBox Population of Cell Range | Excel Programming |