Greasle
New Member
- Joined
- Jul 24, 2017
- Messages
- 21
Hi all,
I see a default key shortcut To fill color
Alt + H + H
But I cant find an example how to set my own key shortcut by VBA hitting a key twice.
I wonder how it is done. Just as a study.
Just single hits of a key is no problem as shown below.
Greasle
I see a default key shortcut To fill color
Alt + H + H
But I cant find an example how to set my own key shortcut by VBA hitting a key twice.
I wonder how it is done. Just as a study.
Just single hits of a key is no problem as shown below.
VBA Code:
Sub AssignMacroToShortcut()
'+ = Ctrl
'^ = Shift
'{T} = the shortcut letter
Application.OnKey "+^{T}", "hi"
End Sub
Sub hi()
MsgBox " hi you pressed Ctrl Shift T"
End Sub
Greasle