Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim ListboxTotalItem As Integer = ListBox1.Items.Count - 1 Dim a(ListboxTotalItem) As String
For i As Integer = 0 To ListboxTotalItem a(i) = i Next