making hotkey in textbox in userform

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.

*** Sent via Developersdex http://www.developersdex.com ***
 
E

excelent

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top