Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable F1 key in Office (especially Excel) (LOW PRIORITY) 2

Status
Not open for further replies.

walla07

Technical User
Mar 18, 2004
17
0
0
GB
A purely cosmetic question...

Is there a way of disabling the F1 key in Excel, so that it doesn't call up the Help application, without turning off the functions of the other F keys.

I regularly use F2, F4, etc., but occasionally miss F2 and end up hitting F1 and then have to wait whilst the Help screen loads up.

Like I said, low priority, but it would help to calm me down a little.


Thanks for any help.
 
Hi,

Enter this in the workbook_open event in your personal.xls:

Code:
Private Sub Workbook_Open()
Application.OnKey "{F1}", "disable_key"
End Sub

Then create a blank macro in a module by the name "disable_key"

Code:
Sub disable_key()

End Sub

This can be used to disable any key of course; as well as to overwrite the current shortcut.

// Patrik
______________________________

To the optimist, the glass is half full. To the pessimist, the glass is half empty. To the IT Professional, the glass is twice as big as it needs to be.
 
Hi walla07,

You don't need a dummy routine, just ..

[blue][tt] Application.OnKey "{F1}", ""[/tt][/blue]

.. will disable it. Put it in the Workbook_Open code (as Patrik suggests) for a single workbook or an Application Event if you want it off all the time for all workbooks.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at [url=http://www.vbaexpress.
 
Thank you both very much for helping me with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top