PDA

View Full Version : Change Save as Keyboard shortcut



JG4life
04-07-2006, 06:44 AM
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

JG4life
04-07-2006, 07:40 AM
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


Sub Manual_SaveAs()

Application.Dialogs(xlDialogSaveAs).Show

End Sub


Assign Keyboard shortcut


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


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

lucas
04-07-2006, 08:01 AM
Thanks for posting your solution Sean.