Thang Dang
Thang Dang

Reputation: 493

Disable F1 (Help Button)

 Sub DiableHelp()
    '
    ' DiableHelp Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+H
    '
    Application.OnKey "{F1}", ""

End Sub

Upvotes: 0

Views: 1679

Answers (3)

Thang Dang
Thang Dang

Reputation: 493

The Answer work for me in this problem is: Use a shortcut key to close "Help" dialogbox: Ctrl + Space + C

//Only work when does not press outside the dialogbox Link: https://marqueegroup.ca/resource/keyboard-shortcut-creating-the-power-of-alt-f4/

VBA:

Through the comment from @Prebsus. I found. https://www.reddit.com/r/excel/comments/7i4un8/how_to_disable_f1_help_hotkey_permanently/ Step 1: Enable Personal.xslb Step 2: Then apply VBA for Personal.xslb on Excel.

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

Step 3: Hide it after apply the code For details to open Personal.xslb: https://www.ablebits.com/office-addins-blog/2020/03/04/excel-personal-macro-workbook/

Or you can change Win 10 configuration: https://answers.microsoft.com/en-us/windows/forum/all/disable-f1-how-to-get-help-in-windows-10/b4ec01ad-eed3-4246-87d7-01c05e16ca71?auth=1

Upvotes: 0

Annihilannic
Annihilannic

Reputation: 159

I use AutoHotKey scripts for various things already, so I just added this one to handle F1 in Excel:

; Stop F1 loading help in Excel when I really wanted F2!
; $ uses keyhook (i.e. actual keyboard input) to avoid retriggering this hotkey
$F1::
if WinActive("ahk_class XLMAIN")
{
    MsgBox, You didn't really want F1, did you?
} else {
    Send {F1}
}
Return

Of course you could just do nothing rather than displaying a message box if you prefer.

Upvotes: 0

castelu
castelu

Reputation: 49

I finally figured out the code that disables the F1 key across all platforms, all software, and all applications, WITHOUT changing the registry:

  1. Take a small strip of paper. Fold it up a couple times until it is thick enough to jam the F1 key but not so thick as to break the key.
  2. Jam the folded paper under or into the sides of the F1 key.
  3. Secure with tape if needed.

If that code doesn't work, here's an alternative snippet that can be used:

  1. Use bits of plastic or cardboard to make a tiny box that fits around your F1 key.
  2. Affix this box with duct tape, so that the F1 key is guarded.

Fool-proof, works on any key, and can easily be reversed if needed!

Upvotes: 4

Related Questions