DavidTigerch
MIS
Hi all i got a form that i need to process listbox items on by one automatically by sending it to a textbox but when i click command2 i see the highlight moves so fast and reaches last item in my listbox without allowing my textbox to process all listbox items. Could any one tell me how to solve this problem .Thanks
Code:
Private Sub Command1_Click()
Dim i As Long
For i = 0 To List1.ListCount - 1
List1.Selected(i) = True
txtVariableValue(0) = List1.List(i)
'MsgBox List1.List(i)
DoEvents
cmdSend_Click ' this calls another function to textbox data
Next
End Sub
'Private Sub txtVariableValue_Change(Index As Integer)
'cmdSend_Click
'End Sub
Private Sub Form_Load()
List1.AddItem "item1"
List1.AddItem "item2"
List1.AddItem "item3"
List1.AddItem "item4"
List1.AddItem "item5"
List1.AddItem "item6"
List1.AddItem "item7"
List1.AddItem "item8"
List1.AddItem "item9"
End Sub