#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default list box

Hello All,

I have created a userform where the user makes inputs
into a text box that populates a list box. There can be
multiple inputs into the list box. My question
is.....once I have multiple inputs into the list box, how
do I recognize each individual entry and transfer them to
my excel sheet? I can populate the listbox, but I am
stuck after that.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default list box

Dim rw as Long, i as long
rw = 24

for i = 0 to listbox1.listcount - 1
cells(rw,1) = listbox1.list(i)
rw = rw + 1
Next

--
Regards,
Tom Ogilvy


"TimO" wrote in message
...
Hello All,

I have created a userform where the user makes inputs
into a text box that populates a list box. There can be
multiple inputs into the list box. My question
is.....once I have multiple inputs into the list box, how
do I recognize each individual entry and transfer them to
my excel sheet? I can populate the listbox, but I am
stuck after that.

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default list box

Tim,

Here is something of the top of my head. It may not be perfext, but it will
get you started... The name of my list box is "lstListBox".

Sub PostListBoxEntries()
Dim i as Integer

For i = 0 to lstListBox.Listcount - 1
ActiveCell.Offset(i,0).Value = lstListBox.List(i)
Next

End Sub

List box entries are addressed by index; the first being index 0. Listcount
returns the number of entries in the list, which is one greater than the
greatest index, hence the "- 1" in the loop.

Hope this works for you.

Dale

"TimO" wrote:

Hello All,

I have created a userform where the user makes inputs
into a text box that populates a list box. There can be
multiple inputs into the list box. My question
is.....once I have multiple inputs into the list box, how
do I recognize each individual entry and transfer them to
my excel sheet? I can populate the listbox, but I am
stuck after that.

Thanks in advance.

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
Comparing List A to List B and add what's missing from List B Gilbert Excel Discussion (Misc queries) 1 July 20th 09 08:41 PM
create new list from list A, but with exclusions from a list B Harold Good Excel Worksheet Functions 3 April 11th 08 11:23 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 Ed Excel Worksheet Functions 5 September 12th 05 09:48 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM


All times are GMT +1. The time now is 04:46 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"