Thank you StevenM, working good.
I´m trying to combine this with my code for an external file.
I´m also trying to figure out how to add a third part to the sList.
Option Explicit
Private Sub ListBox1_Click()
Const sList = "A,B,C,D,E,F,G;H,I,J,K,L,M,N,O,P:Q,R,S,T,U"
Dim sArray() As String
sArray = Split(sList, ";")
If ListBox1.ListIndex = 0 Then
ListBox2.List = Split(sArray(0), ",")
Else
ListBox2.List = Split(sArray(1), ",")
End If
End Sub
Private Sub UserForm_Initialize()
Const sList = "List 1;List 2;List 3"
ListBox1.List = Split(sList, ";")
End Sub
ListBox2.List = Split(sArray(1), ",")
How do I add another list?
Thank you.
Marco
Bookmarks