I'm not sure what you're asking, but if you want your button to change the
selection in a list box to the next item, you can use this code:
Private Sub cmdNext_Click()
lstMyListBox.SetFocus
If lstMyListBox.ListIndex = lstMyListBox.ListCount - 1 Then
lstMyListBox.ListIndex = 0
Else
lstMyListBox.ListIndex = lstMyListBox.ListIndex + 1
End If
End Sub
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.