How do I delete all elements of a combobox
How do I clear out all of the elements in a system.string before the combobox is used again during runtime? Below is the code for how I load it...
Private Sub printout(ByRef letters As String(), ByRef grades As String())
Dim x As Integer
Dim strarray(25) As System.String
'Dim strarray(25) As String
'strarray = New String()
For x = LBound(strarray) To UBound(strarray)
strarray(x) = letters(x) & " - " & grades(x) 'loads results into array
Next
TextBox1.Text = "" 'clears textbox
ComboBox1.Items.AddRange(strarray) 'loads combobox with values
End Sub
|