making hotkey in textbox in userform

  • Thread starter Thread starter x taol
  • Start date Start date
X

x taol

Private Sub CommandButton3_Click()
Application.OnKey "{F3}", "uMain.ddd"
End Sub
Sub ddd()
Me.textbox1.SetFocus
End Sub

the upper source does not work.
i want to make a hotkey(shortcut) the specific textbox control.
 
Try:

Private Sub CommandButton3_Click()
Application.OnKey "{F3}", "ddd"
End Sub

Sub ddd()
ActiveSheet.Shapes("TextBox1").Select
End Sub

Sub ResetKey()
Application.OnKey "{F3}", ""
End Sub
 
Back
Top