Can I configure Excel for not to respond on "F1" key press

M

Murtaza

I want Excel to not show the Help on F1 press, as I dont need Help that
often. But also I dont want to remove the Help support at all.
 
H

Harald Staff

Hi

A small macro can fix that:

Sub DisableHelp()
Application.OnKey "{F1}", ThisWorkbook.Name & "!Dummy"
End Sub

Sub EnableHelp()
Application.OnKey "{F1}"
End Sub

Sub Dummy()
MsgBox "You are paid to know this stuff", vbInformation
End Sub

Help menu will work as always.

HTH. best wishes Harald
 
J

Jim May

In what type Module do these 3 procedures go?


Harald Staff said:
Hi

A small macro can fix that:

Sub DisableHelp()
Application.OnKey "{F1}", ThisWorkbook.Name & "!Dummy"
End Sub

Sub EnableHelp()
Application.OnKey "{F1}"
End Sub

Sub Dummy()
MsgBox "You are paid to know this stuff", vbInformation
End Sub

Help menu will work as always.

HTH. best wishes Harald
 
D

Dave Peterson

I'd put them in a General module.

Another way to stop the F1 key (without any notice to the user at all):

Sub DisableHelp2()
Application.OnKey "{F1}", ""
End Sub
 
J

Jim May

Yeah,
I had it there expecting it to run without "running-it"
Added DisableHelp() to Workbook.Open;
Everything is now ROSEY, tks,
Jim
 
M

Murtaza

Code doesn't work if we press "F1" after pressing "F2".

Jim May said:
Yeah,
I had it there expecting it to run without "running-it"
Added DisableHelp() to Workbook.Open;
Everything is now ROSEY, tks,
Jim
 
D

Dave Peterson

If you're in the middle of editing a cell, then macros (well, any meaningful
macros) don't execute.

I don't think you can stop this behavior--(Break the F1 key on your keyboard may
work for you, though <vbg>.)


Code doesn't work if we press "F1" after pressing "F2".
 
Top