Populating a ListBox with an Array
not really. but maybe this example can get you started.
Private Sub ListBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim ws As Worksheet
Dim i As Long
Set ws = Worksheets("Sheet1")
For i = 1 To 8
If Me.ListBox1.Value = "A" Then
Me.ListBox2.AddItem Worksheets("Sheet1").Range("A" & i).Value
Else
Me.ListBox2.AddItem Worksheets("Sheet1").Range("B" & i).Value
End If
Next
End Sub
--
Gary Keramidas
Excel 2003
"ironhydroxide" wrote in message
...
I have 2 ListBoxes on my UserForm, the ListBox1 Has a list in it
(RowSourced) and i want the Userform to Put information (a list) in
ListBox2
According to what is selected in ListBox1.
I have it far enough that i can get a start cell and stop cell (in the
same
column) of the information I want. This is the information i want in
ListBox1
I hope i have made this clear enough
Thanks in advance
ironhydroxide
|