[RESOLVED] [2005] Select ListBox Item
I have this code...
Code:
Dim i As Integer
Dim c As String
i = Me.ListBox1.Items.Count
c = Me.ListBox1.SelectedItem
Me.ListBox1.Focus()
For Each c In ListBox1.SelectedItems
Me.ListBox2.Items.Add(c)
Next
For Each c In ListBox2.Items
ListBox1.Items.Remove(c)
Next
If i = 0 Then
Me.Timer1.Enabled = False
End If
How can i make, by clicking a button to select the first item of listbox1 ? I have searched and searched and googled... and lived... duh...!
Can anyone help me with that line of code ? Thanx!
Re: [2005] Select ListBox Item
VB Code:
Me.Timer1.Enabled = (Me.ListBox1.Items.Count <> 0)
Me.ListBox2.Items.AddRange(Me.ListBox1.Items)
Me.ListBox1.Items.Clear()
Me.ListBox2.SelectedIndex = 0
Re: [2005] Select ListBox Item
Thanks alot for the help...