Add-In Shortcut key

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to assign a shortcut key to a macro in an add-in. I added the
following to ThisWorkbook

Private Sub Workbook_Open()
Application.OnKey "+^{R}", "Liquidity.LiquidityCollFormat"
Application.OnKey "^{R}", "Liquidity.LiquidityResize"
End Sub

but when I try to run it I get the message, The Macro c:\... cannot be found.

Where have I gone wrong?

Many thanks for any assistance.
 
You have this assigned as a PRIVATE SUB, the shortcut keys can not work with
a private sub. make Sub Workbook_open()
also it is possible it is pointing to a macro in a workbook that does not
exist. Check the add-in location.
 
Back
Top