• assing shortcut key to Excel procedure (NL/XP)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » assing shortcut key to Excel procedure (NL/XP)

    Author
    Topic
    #451999

    Hello all,
    When creating custom commandbars I want also to set a shortcut key to the buttons.
    Is that possible?
    If so,how?

    Viewing 1 reply thread
    Author
    Replies
    • #1114513

      You can assign a macro to a custom toolbar button by setting the OnAction property to the name of the macro.
      You can assign a keyboard shortcut to the macro by using Application.OnKey, not to the toolbar button.

    • #1114515

      You can also put an ampersand character – & – in front of one letter in the commandbar caption. This will specify the character to use as the “Accelerator key” for that command.

      In the user interface the selected character will be underlined, like the attached screenshot. So you can use Alt-I, N, R for insert cross reference.

      StuartR

    Viewing 1 reply thread
    Reply To: assing shortcut key to Excel procedure (NL/XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: