Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 259
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox population question Mekinnik Excel Programming 1 November 4th 07 04:09 AM
ComboBox Population Philip Excel Programming 1 November 19th 05 02:05 PM
combobox population dirt Excel Programming 0 December 22nd 04 03:16 PM
Combobox Population stck2mlon[_19_] Excel Programming 4 June 3rd 04 12:37 PM
ComboBox Population of Cell Range Phil Hageman[_3_] Excel Programming 1 April 14th 04 01:56 PM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"