CodePudding user response:
KeypressKeydown
Keyup
These three events?
CodePudding user response:
Private Sub List1_KeyDown (KeyCode As an Integer, Shift the As an Integer)
If KeyCode=vbKeyReturn Then
Text2=List1. Text
End the If
End Sub
CodePudding user response:
Private Sub ListBox1_KeyPress (ByVal KeyAscii As MSForms. ReturnInteger)
If (KeyAscii=vbKeyReturn) Then TextBox2. Text=ListBox1. Text
End Sub
CodePudding user response:
VBA window ListBox, support itself with the arrow keys left to change the selected items, don't have to write code to handle,(note: to make it gains focus after, press the arrow keys to effective)