Private Sub CommandButton1_Click()
Dim i As Long
For i = 1 To 11
TextBox1.Text = "Sample" & i
ListBox1.AddItem TextBox1.Text
ListBox1.ListIndex = ListBox1.ListCount - 1
Next i
End Sub
Private Sub CommandButton1_Click()
Dim i As Long, buf As String
buf = Dir("C:\Windows\")
Do While buf <> ""
ListBox1.AddItem buf
ListBox1.ListIndex = ListBox1.ListCount - 1
DoEvents
buf = Dir()
Loop
End Sub