+ Reply to Thread
Results 1 to 3 of 3

Run macro with keystrokes

  1. #1
    Registered User
    Join Date
    02-02-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2011
    Posts
    16

    Run macro with keystrokes

    I have a simple macro that toggles the color of selected cells. If I run it from the debugger, it works fine. However I have been unsuccessful in creating a keystroke combination for it. I am using Excel 2011 on a MacBook Pro and my Excel files are .xlsm. My macro workbook and the macros are all xlsm.

    I have tried many different keystroke combinations using CTRL-CMD-letter.
    I cant find any single letter that works. I also tried ONKEY and tried to define a key to simulate the ENTER key since there is no ENTER key on a MacBook Pro.

    Here is the macro that works from the debugger:
    Please Login or Register  to view this content.
    I have tried several different versions of OnKey, none of which work. Here is a sample:

    Please Login or Register  to view this content.
    I've been working on this for months. In Personal Macro Notebook using xls files of prior EXCEL versions I used the key combination of CMD-CTRL-q to run Yellow
    cell flawlessly.

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Run macro with keystrokes

    hi,
    not sure if it helps you, did you try to record a macro and then to change ...the content?
    just try, save it and open the file again...
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    02-02-2012
    Location
    Orlando, FL
    MS-Off Ver
    Excel 2011
    Posts
    16

    Re: Run macro with keystrokes

    Thanks John, but your code shows the shortcut as "Ctrl+a". My version requires CMD+OPT+(one text letter that is not a system command shortcut). I recorded a nothing macro, set the keyboard command to CMD+OPT+e , pasted the original working macro code into it nd it works. I had to try many keys before I found one that worked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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