By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,593 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,593 IT Pros & Developers. It's quick & easy.

scrolling listbox?

P: 26

I'm trying to make a listbox with a moveable index on a timer. So every second the selected index moves down one and so forth in that fashion. When it reaches the last index it should go back to the top and repeat until timer is shut off.

Expand|Select|Wrap|Line Numbers
  1. Private Sub tmrAttempt_Timer()
  2. On Error Resume Next
  3. Dim i As Integer
  4. For i = 1 To List1.ListCount - 1
  5.     List1.ListIndex = List1.ListCount - 1
  6.     If i = 0 Then List1.ListIndex -1
  7. Next i
  8. End Sub
Any help is greatly appreciated.

Dec 16 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 5K+
P: 8,434
I think you've got the wrong idea about how to use the timer. Each time the timer "ticks" you should just move the selection one place, not loop through them.
Dec 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.