View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
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