Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default How to get entries into a list box

H, I'm attempting a program to enter data into a list box and I'm having a
few problems, this is my first attempt t a VBA list box. Thank you for any
help you can offer Thanks Jill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default How to get entries into a list box

Jill,
Some of the ways to populate a listbox.

(Xl2003)


HTH

Private Sub UserForm_Initialize()

ListBox1.RowSource = "Sheet2!a1:a10"
'
' OR
'

ListBox1.RowSource = "MyList" ' <=== Named range
'
' OR
'
For j = 1 To 10
ListBox1.AddItem "aa" & j ' or could be range("b" & j) or similar
Next j

End Sub

"Jill" wrote:

H, I'm attempting a program to enter data into a list box and I'm having a
few problems, this is my first attempt t a VBA list box. Thank you for any
help you can offer Thanks Jill

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
Reducing a List by Eliminating Entries from Another List Ralph Excel Discussion (Misc queries) 7 September 30th 09 12:57 AM
how to identify unique list of 200 random entries from a list of 3 tjb Excel Worksheet Functions 3 August 13th 07 02:15 PM
make a list from another list ignoring duplicate entries from orig Kroka Excel Worksheet Functions 1 March 7th 07 10:36 PM
Removing all entries in one list that appear in a different list WLarson Excel Discussion (Misc queries) 1 May 12th 06 02:39 AM
Need to create unique list from list of multiple entries Jeff Excel Programming 1 September 17th 05 05:37 AM


All times are GMT +1. The time now is 10:42 AM.

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"