I want to focus another control when I press both Ctrl key and Enter Key in a text box. How can I do this?
Handle Ctrl key and Enter Key
Collapse
X
-
-
This code jumps to Command3 if CTRL and ENTER are pressed in Text1.
Code:Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyReturn And Shift = 2 Then Command3.SetFocus End If End Sub -
Comment
-
You can't use this with Keypress because it controls only on 1 key= KeyAscii
Private Sub Text1_KeyPress( KeyAscii As Integer)Comment
Comment