The F1 key is used to summon forth Excel's help system. Depending on how you type, you may find the F1 key bothersome. For instance, if you meant to press F2 to edit the contents of a cell, but you instead press F1, this can throw a real crimp in your editing stride. For this reason, you may look for an easy way to disable the F1 key.
One definitely low-tech solution is to simply remove the key. They F1 keycap, on most keyboards used with desktop systems, is relatively easy to remove. If it is a bit stubborn, you may need to slip the edge of a small screwdriver under the cap to help pry it loose.
If you don't like doing this type of keyboard surgery, you can disable the key through the use of a macro. This macro could be included in your Personal workbook file, as a part of the Open event, so that it runs every time that Excel is started. The macro should contain a single command:
Application.OnKey "{F1}", ""
The OnKey method is only triggered, in this case, when the F1 key is pressed. This usage results in the F1 key being ignored. If you wanted the F1 key to run some different procedure, you could use it as follows:
Application.OnKey "{F1}", "MyProcedure"
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2089) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Disabling the F1 Key.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-09-02 16:44:05
FakeName
FYI, this has to be saved in a sub called Auto_Open in the PERSONAL.XLSB module
2020-01-22 01:56:03
Alam
I suggest having F1 invoke edit - I seem to manage to hot F1 rather than F2 almost all the time 🤬
2018-11-14 16:42:07
Mitch
Thanks for this tip!
I now have a follow-up question. If I wanted to remove this macro, how is this done? I tried to "Remove" the "VBAProject (Personal.XLSB)", but the "Remove" button when right-clicking is not clickable.
Do you have any suggestions for moving forward? I've deleted the actual macro script but whenever I open a new workbook I receive "Personal.XLSB" messages.
Thanks,
M
2015-09-11 01:22:06
Michael
Thanks a lot!
2015-06-09 14:53:47
Bela Groves
This is really good. I've wanted to disable the F1-help key for a long time.
Thanks
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2022 Sharon Parq Associates, Inc.
Comments