How can I let show the record from a listbox in a textbox when I go tru the listbox with the up and down arrow keys ?
Printable View
How can I let show the record from a listbox in a textbox when I go tru the listbox with the up and down arrow keys ?
Hi there, you just put the selected value of the listbox on the textfield in the click event of the listbox:
Have a nice dayCode:Private Sub List1_Click()
Text1.Text = List1.Text
End Sub
André
to allow the arrow keys to also change the text box
Private Sub List1_KeyUp(KeyCode As Integer, Shift As Integer)
Text1.Text = List1.Text
End Sub
' will change the contents of the text box when you let
' go of up or down arrow
I agree, but with the click event your user can both use the arrows and the mouse from the same event!
André
thanks to you all !
Both works fine
regards, Kars