Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Grd Grd is offline
external usenet poster
 
Posts: 118
Default How to get a list of items onto a list box on a form

Hi there,

I'm stuck and can't seem to figure out how to get a list that I have of 5
names onto a list box on a form I've created.

Anyone done this before.

Any help greatly appreciated

Thanks

Sandra
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default How to get a list of items onto a list box on a form

Sandra,

Something like this in the code module for the form.
It runs every time the form is loaded (not when it's shown).
'-------------------------------------------
Private Sub UserForm_Initialize()
Dim varArray As Variant
varArray = Array("Larry", "Moe", "Curly", "Ashley", "Judd")
UserForm1.ListBox1.List = varArray
End Sub
'-------------------------------------------

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware




"Grd"
wrote in message
Hi there,
I'm stuck and can't seem to figure out how to get a list that I have of 5
names onto a list box on a form I've created.
Anyone done this before.
Any help greatly appreciated
Thanks
Sandra
  #3   Report Post  
Posted to microsoft.public.excel.programming
Grd Grd is offline
external usenet poster
 
Posts: 118
Default How to get a list of items onto a list box on a form

Thanks

this works well


"Jim Cone" wrote:

Sandra,

Something like this in the code module for the form.
It runs every time the form is loaded (not when it's shown).
'-------------------------------------------
Private Sub UserForm_Initialize()
Dim varArray As Variant
varArray = Array("Larry", "Moe", "Curly", "Ashley", "Judd")
UserForm1.ListBox1.List = varArray
End Sub
'-------------------------------------------

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware




"Grd"
wrote in message
Hi there,
I'm stuck and can't seem to figure out how to get a list that I have of 5
names onto a list box on a form I've created.
Anyone done this before.
Any help greatly appreciated
Thanks
Sandra

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
Data validation list - list doesn't show items from top Pwinkle Excel Discussion (Misc queries) 0 June 23rd 09 07:56 PM
List and subtotal selected items, then print separate item list TitanG Excel Worksheet Functions 0 September 8th 08 09:07 PM
Matching items in 2 list to consolidate to one list hot dogs Excel Discussion (Misc queries) 2 April 25th 07 04:01 PM
How to pick one or more items out of a list, moving to new list, moving up or down. (form) Subteam Excel Discussion (Misc queries) 3 February 17th 06 04:13 AM
2nd Form deselects list box items on main form RandyDtg1 Excel Programming 3 September 5th 04 09:32 PM


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