Add-In Shortcut key

X

xgirl

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.
 
B

ben

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top