Monday, October 1, 2007

Disable the F1 key in Excel

I've frequently heard the rumor that in investment banks they will put take the F1 key off of keyboards so that analysts don't use the help menu.

I can't attest to the validity of this strategy, but definitely F1 gets in the way. I can't remember how many times I've tried to hit F2 to edit a cell and accidentely hit F1. The help screen takes a few seconds to load, slowing me down and frustrating me. Here's the fix.


  • Unhide your personal.xls file
  • Tools->Macros->Visual Basic Editor
  • Choose the "ThisWorkbook" file icon in the upper left hand box
  • Add this VB code:
    Private Sub Workbook_Open()
    Application.OnKey "{F1}", ""
    End Sub

  • Save the file, and close.

Boom, no more accidental MS help windows!

5 comments:

Matt said...
This comment has been removed by the author.
Matt said...
This comment has been removed by the author.
Antranik said...

This is great, thanks.
But it doesn't work if I press F2 first and have the cell in edit mode, the F1 key still works.
Any thoughts?
Thanks.

John said...

Can you provide instructions for doing this in Excel 2007?

Anonymous said...

ARgh!!! Just pop the key out!

Monday, October 1, 2007