+ Reply to Thread
Results 1 to 3 of 3

Code:Run Macro from Keyboard Shortcut

  1. #1
    Registered User
    Join Date
    05-05-2006
    Posts
    10

    Code:Run Macro from Keyboard Shortcut

    HELP says: "The shortcut key will override any default Microsoft Excel shortcut keys while the workbook that contains the macro is open."

    1. Want to create macro and assign it to Ctl+S in only one Workbook, Workbook A, to save Workbook A in multiple locations.
    2. I have Workbooks A, B, C, D and E open at the same time but am working in Workbook A.
    3. If I switch to Workbook B, C, D or E (with the original 5 files open) and use Ctl+S, will it save in a normal fashion or will it save to the locations assigned in Workbook A with the new Ctl+S macro.
    4. In other words, does the new Ctl+S macro assigned to one file automatically override the Ctl+S default in any other open file?

    Thanks so much for your help!

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845
    Sar,

    I beleive if you assign a "ctrl s" to run a macro it will run the maco and not do a save. This is only for a wokbook that you have open and assigned the function to. Otherwise all it will do is save.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Forum Contributor
    Join Date
    03-24-2005
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    378

    Why Not Assign

    Why not assign the macro to <Ctrl><Shift><S>?

    Go to > Tools > Macro > Macros to get the Macro Dialog.

    Select your macro and click on Options, just like assigning any keyboard shortcut.

    Then press and hold the <Shift> key while pressing the "S" key.

    Now <Ctrl><S> will remain unchanged and <Ctrl><Shift><S> will run your code.
    Thanks!
    Dennis

    I am using Windows 7 and Office 2007, all of my posts are based on this.

+ 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