-
Greetings Ukdane,
You can add a shortcut key combination to run a macro, but it wouldn't be added to the command bar building proedure. Rather, try adding akin to below, to the workbook activate and deactivate events. This way, its only in effect while the user has your workbook in use.
See the help topic OnKey for different key assigning; the below assigns CTRL + "d" to your macro; and the OnKey w/no arg resets the combo to its default action.
Hope this helps,
Mark
[vba]Private Sub Workbook_Activate()
Application.OnKey "^d", "addlink"
End Sub
Private Sub Workbook_Deactivate()
Application.OnKey "^d"
End Sub[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules