Next Record in ListBox

M

Martin

Is there an easy way to move to the next record in a list box after the list
box has been clicked on?

Martin
 
S

Stuart McCall

Martin said:
Is there an easy way to move to the next record in a list box after the
list
box has been clicked on?

Martin

Try the following code in your listbox's AfterUpdate event:

Dim idx As Long

With Me.MyListbox
idx = .ListIndex
If .ListCount > 1 And idx < .ListCount Then
.ListIndex = idx + 1
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top