Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 181
Default Userform list box population

I need to have a field in a user form to select from a list of options...
I guess I use listbox but I do not know how does it works... ho do I
populate the lsit so it will show in the form?

I already place the question about two hours ago but it does not show in the
forum so I guess it got lost in limbo.

Help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Userform list box population

Hi,

I think you may need a combobox and one way of populating it is like this

Private Sub UserForm_Initialize()
For x = 1 To 10
ComboBox1.AddItem Sheets("Sheet3").Cells(x, 1).Value
Next
End Sub


Mike
"Alberto Ast" wrote:

I need to have a field in a user form to select from a list of options...
I guess I use listbox but I do not know how does it works... ho do I
populate the lsit so it will show in the form?

I already place the question about two hours ago but it does not show in the
forum so I guess it got lost in limbo.

Help is appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 181
Default Userform list box population

It worked great, thanks... but do I have to put the data in a row..? how do I
do it in a column?

"Mike H" wrote:

Hi,

I think you may need a combobox and one way of populating it is like this

Private Sub UserForm_Initialize()
For x = 1 To 10
ComboBox1.AddItem Sheets("Sheet3").Cells(x, 1).Value
Next
End Sub


Mike
"Alberto Ast" wrote:

I need to have a field in a user form to select from a list of options...
I guess I use listbox but I do not know how does it works... ho do I
populate the lsit so it will show in the form?

I already place the question about two hours ago but it does not show in the
forum so I guess it got lost in limbo.

Help is appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Userform list box population

'For range A1:J1
Private Sub UserForm_Initialize()
For x = 1 To 10
ComboBox1.AddItem Sheets("Sheet3").Cells(1, x).Value
Next
End Sub

OR

Dim cell as Range
For each cell in Sheets("Sheet3").Range("A1:J1")
ComboBox1.AddItem cell.Text
Next



If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

It worked great, thanks... but do I have to put the data in a row..? how do I
do it in a column?

"Mike H" wrote:

Hi,

I think you may need a combobox and one way of populating it is like this

Private Sub UserForm_Initialize()
For x = 1 To 10
ComboBox1.AddItem Sheets("Sheet3").Cells(x, 1).Value
Next
End Sub


Mike
"Alberto Ast" wrote:

I need to have a field in a user form to select from a list of options...
I guess I use listbox but I do not know how does it works... ho do I
populate the lsit so it will show in the form?

I already place the question about two hours ago but it does not show in the
forum so I guess it got lost in limbo.

Help is appreciated.

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
Selection of drop down list directs auto population of other cell Maj J Schwartz Excel Discussion (Misc queries) 1 August 7th 09 07:19 PM
list userform Joanne Excel Discussion (Misc queries) 0 June 28th 07 01:18 AM
Can I have automatic cell population while using combo list? rick Excel Discussion (Misc queries) 7 March 28th 06 05:28 AM
Drop-down list & auto-population of cells TC Excel Worksheet Functions 3 December 21st 05 04:21 AM
Conditional population of list boxes in Excel? ccoursey Excel Discussion (Misc queries) 2 June 2nd 05 10:16 PM


All times are GMT +1. The time now is 11:35 PM.

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

About Us

"It's about Microsoft Excel"