Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Disabling the F1 Key.
Written by Allen Wyatt (last updated June 4, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003
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.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-06-04 11:18:31
Pieter de la Court
Dear Allen,
This ExcelTip is a great solution for me, as I have had a lot of trouble with the F1 key since getting a new laptop.
However, your instruction does not have the full clarity and completeness that we have come to expect from you.
Where to put this command? Where do I find the Personal Macro Workbook? How do I get it into the Open event?
I had to google these questions before I could implement the command:
1. If not already available, create the Personal Macro Workbook by creating a random macro, selecting "Personal Macro Workbook" under "Store macro in". This macro can later be deleted.
2. Save the workbooks (all) and close Excel.
3. Reopen Excel, go to VBA editor (Alt-F11), open the "PERSONAL.XLSB" "This workbook" page.
4. Write the code:
Sub Workbook_Open()
Application.OnKey "{F1}", ""
End Sub
5. Save and close the workbook.
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 © 2024 Sharon Parq Associates, Inc.
Comments