I can't see where I am going wrong. I have a text file with this in it:

dept=div1,div2,div3
dept2=div1,div4

I tried this but where does the string after the = go?

Code:
 Dim tfLines() As String = System.IO.File.ReadAllLines("text.ini") ' File to load.
        For Each line As String In tfLines ' Load and read all lines in file.
            DeptDropDown = line.Split("="c) ' Split using =.
            DivDropDown = DeptDropDown(1).Split(","c) ' Split using ,.
           
        Next
That errors out on the second split with : "Index was outside the bounds of the array."

My idea was to load dropdown1 and once changed load what is after the = sign to another drop down depending on what was selected in dropdown1. So if I selected "dept" in dropdown1 then dropdown2 will contain div1 div2 div3 in succession