View Single Post
  #4   Report Post  
Marcia3641
 
Posts: n/a
Default

Thanks Bob and dominicb. Here is what I have:
Private Sub ListBoxAgeGrp_Click()
..AddItem "Under 25"
..AddItem "26 - 34"
..AddItem "35 - 42"
..AddItem "43 - 55"
..AddItem "56 - 62"
..AddItems "63 and over"
End With
End Sub
Does it make a difference that mine says "click" instead of "initialize"?
Also, how do I check and see if it worked. I tried going to run usferform but
it didn't show the list that I created. Boy this is hard stuff!
--
Marcia3641


"dominicb" wrote:


Good evening Marcia3641

You need to put some code such as this behind the userform:

Private Sub UserForm_Initialize()
With ListBox1
.AddItem "Item 1"
.AddItem "Item 2"
.AddItem "Item 3"
.AddItem "Item 4"
End With
End Sub

This code assumes that your listbox is called ListBox1.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=388914