I have a userform with a scroll bar that allows the user to scrool to the row they want. Potentially there will be thousands of rows of data. Is there a way to jump to a specific part of the list say the ones starting with "G"? Thanks
I have a userform with a scroll bar that allows the user to scrool to the row they want. Potentially there will be thousands of rows of data. Is there a way to jump to a specific part of the list say the ones starting with "G"? Thanks
Peace of mind is found in some of the strangest places.
austenr,
I may be wrong but I think you can add a textbox(textbox2 in my example) and use this code on it:
Private Sub TextBox2_Change() Dim Search As String Dim n As Long Dim i As Long Dim j As Long Search = Me.TextBox2.Text n = Len(Me.TextBox2) j = Me.lstSelection.ListCount - 1 For i = 0 To j If Left(Me.lstSelection.List(i), n) = Search Then Me.lstSelection.Selected(i) = True Exit For End If Next End Sub
lstSelection is the name of your listbox. change those two things to match your listbox and textbox. then when you type the first letter in the search(textbox) it will go there immediatly. Works for me
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
Thaks that worked great!!
Peace of mind is found in some of the strangest places.
Your Welcome,
Glad it works as well for you as it did for me.
Thats one of many I have pilfered from this forum in the past.
You can mark this one solved then?
Steve
"Nearly all men can stand adversity, but if you want to test a man's character, give him power."
-Abraham Lincoln
yep
Peace of mind is found in some of the strangest places.