+ Reply to Thread
Results 1 to 2 of 2

How to assign a Keyboard Shortcut to a VBA Code

  1. #1
    Registered User
    Join Date
    05-03-2017
    Location
    CA
    MS-Off Ver
    210
    Posts
    61

    How to assign a Keyboard Shortcut to a VBA Code

    Hi

    I have my own VBA code. I would like to add a keyboard shortcut to my VBA code. I would like to have this particular VBA code only assigned to my own worksheet.

    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 05-11-2017 at 12:57 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to assign a Keyboard Shortcut to a VBA Code

    While your Excel file is active, go to the Developer tab, then at the left select Macros, then select "Macros in this workbook" from the dropdown. Click on the macro "fen" and the click the Options button. For shortcut key, type a letter in the box. I suggest you use an uppercase letter to avoid replacing a built-in shortcut key. This shortcut will work only when this file is open.

    If you do not see "fen" in the list, make sure the code is in a generic Module (like Module1) and not in a Worksheet module.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel 2013: How to assign Keyboard Shortcut to existing macro?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2017, 08:41 PM
  2. [SOLVED] How to assign a keyboard shortcut instead of a CommandButton to a macro
    By davidx in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2013, 06:50 AM
  3. Assign a Keyboard Shortcut to an Active X Command Button
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-18-2011, 08:32 AM
  4. Assign keyboard shortcut to a Macro - error
    By kmlloyd in forum Excel General
    Replies: 2
    Last Post: 03-08-2011, 12:30 PM
  5. assign keyboard shortcut
    By kiany406 in forum Excel General
    Replies: 3
    Last Post: 11-30-2008, 08:39 PM
  6. [SOLVED] How to assign keyboard shortcut to existing Commandbar controls
    By superjas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2006, 03:25 AM
  7. [SOLVED] How do I assign keyboard shortcut for Grouping?
    By Christina_0123 in forum Excel General
    Replies: 0
    Last Post: 05-03-2006, 12:30 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1