ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   making hotkey in textbox in userform (https://www.excelbanter.com/excel-programming/363173-making-hotkey-textbox-userform.html)

x taol

making hotkey in textbox in userform
 


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 ***

excelent

making hotkey in textbox in userform
 
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



All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com