How to load a listbox in a userform?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
How do I load a listbox in a userform. I've been trying to look for articles
or leassons but have not found anything. Please help.

By the way, thank's to everybody who answered my last question.

Martin
 
Create a dynamic range with your data .... say "MyList"

In the Properties of the Listbox, set Rowsource attribute to "Mylist" (no
quotes)

Clicking on the Listbox in VBE should give you the Properties window

HTH
 
Can you please explain more in detail what to do. When I write Mylist in the
rowsource field I get an error message.
Thank you
Martin
 
To create named (non-dynamic) range:

Highlight your list of data (say A1:A20)

Insert=>Name=>Define ...give it a name ("Mylist").

Rowsource should now work.

For a dynamic range, set the 'Refers to' entry In the Define step) as:

=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A:$A),1)

Change Sheet1 & column (A) if required: this assumes data starts in row 1 (A1)

HTH
 
Back
Top