i made a code
 
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
and i need to repeat it 15 times -
if uni.text = "02" then
..... coursecode(1)
if uni.text = "03" then
..... coursecode(2)
and etc.
i would only like to use the code once instead of 15 times so i wrote a string.
 
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but only "01" works and the rest dont - can anyone tell  me where i went wrong? thanks in advance
	
		
			
		
		
	
				
			
			
				VB.NET:
			
		
		
		         If uni.Text = "01" Then
             myCSV = coursecode(0).ToString.Split(",")
             Me.ListBox15.Items.AddRange(myCSV)
             For ii = 1 To 135
                 Me.ListBox15.Items.Remove("")
             Next
         End Ifif uni.text = "02" then
..... coursecode(1)
if uni.text = "03" then
..... coursecode(2)
and etc.
i would only like to use the code once instead of 15 times so i wrote a string.
			
				VB.NET:
			
		
		
		[b] Dim myCSV() As String
		Dim i As Integer
		Dim ii As Integer
		Dim s As String = "01|02|03|04|05|06"
		Dim my() As String
		my = s.Split("|")
		If uni.Text = my(i) Then
			myCSV = coursecode(my(i) - 1).ToString.Split(",")
			Me.ListBox15.Items.AddRange(myCSV)
			For ii = 1 To 135
				Me.ListBox15.Items.Remove("")
			Next
		End If[/b] 
	 
 
		 
 
		 
 
		