Results 1 to 4 of 4
  1. #1
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    assing shortcut key to Excel procedure (NL/XP)

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

    Patrick Schouten
    (The Netherlands)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: assing shortcut key to Excel procedure (NL/XP)

    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.

  3. #3
    3 Star Lounger siflaar's Avatar
    Join Date
    Jan 2001
    Location
    Amersfoort, Netherlands
    Posts
    203
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: assing shortcut key to Excel procedure (NL/XP)

    thanks Hans.
    Greetings,

    Patrick Schouten
    (The Netherlands)

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: assing shortcut key to Excel procedure (NL/XP)

    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
    Attached Images Attached Images
    • File Type: gif x.gif (10.7 KB, 0 views)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •