PDA

View Full Version : Cntl+. macro ?



fb7894
04-10-2018, 09:58 AM
Is there any way to assign a macro shortcut key of Cntl+period ?

Paul_Hossler
04-10-2018, 11:10 AM
In the ThisWorkbook code module



Option Explicit

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "^."
End Sub

Private Sub Workbook_Open()
Application.OnKey "^.", "Hello"
End Sub