Consulting

Results 1 to 3 of 3

Thread: Change Save as Keyboard shortcut

  1. #1
    VBAX Regular
    Joined
    Mar 2006
    Posts
    11
    Location

    Change Save as Keyboard shortcut

    Good morning. I have a form that is done in excel and every single keyboard shortcut that can allow then to save the file manually instead of using the button I have provided is disabled except for F12 for the save as. I need that function so that I can save changes to the template when I make revisions to the form. I want to disable F12 as well since that is a popular keyboard shortcut and most people know it but before I do I want to assign it to a custom keyboard shortcut so that I can still use the Save as function.

    Anyone have any idea how to do that. I have looked everywhere and I find it hard to believe that no one has done this before LOL

    Sean

  2. #2
    VBAX Regular
    Joined
    Mar 2006
    Posts
    11
    Location
    With a little bit more searching I finally figured it out. I had to create a module with the code below and then assign that Module.subroutine to a Custom Keyboard shortcut.

    Module3

    [VBA]
    Sub Manual_SaveAs()

    Application.Dialogs(xlDialogSaveAs).Show

    End Sub
    [/VBA]

    Assign Keyboard shortcut

    [VBA]
    Private Sub Workbook_Open()

    Application.OnKey "{F12}", "" 'kills F12 - Save As
    Application.OnKey "%y", "Module3.Manual_SaveAs" 'Assigns Save as to ALT + y

    End Sub
    [/VBA]

    That assigns the SaveAs Dialog Box to Alt+Y

    Just thought I would post how I did it in case anyone else wanted to do it. It is simple to do but hard to find on the net LOL most search engines ignore two letter words so looking for "Save as" results in a whole bunch of results for "Save" but nothing for "Save As" because search engines drop the word "As"

    Sean

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Thanks for posting your solution Sean.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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