Hotkeys
Wow that is pretty handy, Thanks Again
Greg B
"Patrick Molloy" wrote in message
...
I'm not sure to be honest - its ages since i last looked at this
to get 114 all I did was drop a label onto a userform
Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
Label1.Caption = KeyCode
End Sub
"Greg B" wrote in message
...
Thanks for that,
Where can I get a list of the numbers for keys? Would be a great help.
Thanks again
Greg B
"Patrick Molloy" wrote in message
...
you could use the userform's keydown event ...
Private Sub UserForm_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
If KeyCode = 114 Then ' 114 is F3
endsale
End If
End Sub
"Greg B" wrote in message
...
Hello and Good morning or evening,
I am wondering about something I have tried a piece of code I found on
the web regarding hotkeys. It will work perfectly in the main excel
sheet but I am hoping to have the capabilities when it has a userform
showing. This code has been put in the open code of the worksheet where
would I put it to be used in the userform?
If this cant happen I am hoping to be able to press 1 button on the
keyboard to shutdown the userform("Sales") and then execute the code
for the next sale.
Application.OnKey "{F3}", "endsale"
Thanks In Advance
Greg B
|