How do I move up and down a file listbox using two buttons?
Note when it reaches the end of the list it should go to the first. :rolleyes:
Printable View
How do I move up and down a file listbox using two buttons?
Note when it reaches the end of the list it should go to the first. :rolleyes:
select the nth item in the listbox when the item selection reaches index = 0;
somewhere on this line ... i m not coding and trying this.. .so u may try to code in this direction!!
I am sorry that has not helped, I need a snippet of code :confused:
Do you mean...
VB Code:
Private Sub cmdDown_Click() If File1.ListIndex < File1.ListCount - 1 Then File1.ListIndex = File1.ListIndex + 1 Else File1.ListIndex = 0 End If End Sub Private Sub cmdUp_Click() If File1.ListIndex > 0 Then File1.ListIndex = File1.ListIndex - 1 Else File1.ListIndex = File1.ListCount - 1 End If End Sub
Spoon Feeding!!!
My God!
You have to understand some of us are new to VB sorry for not being a pro!!!
Great Thank you very much, It really hepled GAVIO :D