I tried the codes posted previously on "read and write from a list box" but they only read the 1s and moved back to the beginning without reading the 3s.
I will like also like a progress bar to increment each time the 3 is encountered.
Expand|Select|Wrap|Line Numbers
- Private Sub msgtimer_Timer()
- Dim msgItem As Long
- 'Timer to send keystrokes
- If msgItem = lstAlert.ListCount - 1 Then msgItem = -1
- msgItem = msgItem + 1
- SendKeys lstAlert.List(msgItem), 10
- If msgItem = "3" Then
- Picture9.BackColor = &HFF&
- prgBar = prgBar + 5
- Else
- If msgItem = "1" Then
- Picture9.BackColor = &HC000&
- End If
- End If
- End Sub
- Private Sub cmdGo_Click()
- msgtimer.Enabled = True
- End Sub