I have a listbox and depending on what they pick on the listbox the combobox is loaded. I now want to change the combo box to be loaded from a string array - how do I do this?
Here is my array:
Here is my array:
VB.NET:
Dim strTitles() As String = {"Advanced VB 2005", "Office 2007", "Object-Oriented Modeling with UML", "Object-Oriented Software Engineering", "VB.NET for Business", "VB 2008"}
Dim strSubject As String
strSubject = ""
strSubject = CStr(lstSubject.SelectedItem)
Select Case strSubject
Case "Introduction to Computers"
cboBooks.Items.Clear()
cboBooks.Items.Add(conOFFICE2007)
Case "Beginning Programming"
cboBooks.Items.Clear()
cboBooks.Items.Add(conVB2008)
cboBooks.Items.Add(conVBNET)
Case "Intermediate Programming"
cboBooks.Items.Clear()
cboBooks.Items.Add(conADVVB2005)
Case "Systems Analysis"
cboBooks.Items.Clear()
cboBooks.Items.Add(conOOSOFTENG)
cboBooks.Items.Add(conOOMODELING)
End Select