Hi,
I'm using Excel 2007 and I find myself frequently pressing F1 key by mistake when I need to press ESC key and I want to cancel F1 from opening Help window. Is it possible? And is it possible to assign ESC to F1?
Thanks.
Hi,
I'm using Excel 2007 and I find myself frequently pressing F1 key by mistake when I need to press ESC key and I want to cancel F1 from opening Help window. Is it possible? And is it possible to assign ESC to F1?
Thanks.
Last edited by excelgenius; 01-26-2024 at 08:09 AM.
Good Day!
You can disable it using Fn Lock (Function Lock) key if it is available in your keyboard.
Hope this helps.
Best,
SaM.
Thanks for the tip, unfortunately I don't have that key on my laptop keyboard.
Which version of Excel do you have? Still Excel 2007? If not, please update your profile. Are you perhaps on a Mac?
Administrative Note:
Although we value your privacy as much you do, it could be important that members have a rough idea of your location as the solutions they offer may be affected by your locale. For instance, you might in the future post questions which are related to your regional settings.
With this in mind, please update your profile to something more precise (something such as UK, Europe, USA, UAE, etc. will suffice).
Thank you for helping us to help you.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
You could use Application.onkey "{f1}", "" in a workbook_open event in your personal macro workbook (if you have one, or create one if not).
Everyone who confuses correlation and causation ends up dead.
Open this link and you will get a good explanation with screenshots of what "rory" means in post #5.
[URL="https://www.extendoffice.com/documents/excel/1798-excel-disable-f1-key.html"]
VBA-code to disable F1 Application.OnKey "{F1}", ""
VBA-code to enable F1 Application.OnKey "{F1}"
Tryed and working in Excel 2007.
/LGS
Last edited by LARS GULYAS; 01-26-2024 at 08:37 PM.
Hi, thank you. I followed the steps on that page. After entering the code as suggested, F1 no longer opens the Help window. But when I save the file as Macro-enabled workbook, close and re-open, F1 still opens the Help window. Also, how do I create a personal macro workbook as rorya suggested? Thanks!
Last edited by excelgenius; 01-30-2024 at 02:36 AM.
Record a macro and choose to save it in the personal macro workbook. If you don't already have one, that will create it. You then need to call the Onkey code from the Workbook_Open event in the ThisWorkbook module (or Auto_Open in a normal module) of the personal macro workbook.
Thank you, it seems I will need to do the same thing to all my existing Excel files -I have a lot- and also I will need to remember to use this macro-enabled file for any new Excel file I create, instead of simply starting Excel from the shortcut -which I frequently use also to rightclick open previous files. Besides, just noticed that the above solution requires clicking the X-close button two times every time I need to close an Excel file due to having a hidden personal macro workbook open. Unless I'm doing it wrong.
This solution, while it may work, seems it will be more cumbersome compared to living with F1 opening the Help window. Still, thank you all.
Last edited by excelgenius; 01-30-2024 at 07:15 AM.
The personal macro workbook will be loaded whenever excel is started, and the code will run automatically. The code affects all open workbooks, so I don't really agree with any of what you just said.![]()
Thank you for your persistence in helping, I will try one more time and see if I can make it work for all existing/future files and without requiring double X-click.
Ok, so, I managed to make it not display Help window when F1 is pressed, for existing and future files, following your instructions and hiding PERSONAL.XLSB. But when I click red X button on top right to close Excel, it closes only the current file, not Excel itself -I guess that's because PERSONAL.XLSB is open even if hidden.
I also noticed that, with the above applied, if I press Ctrl + F to open Find window, then pressing F1 still opens Help window
Is there a X-button click event or something that I can use to close Excel when X button is clicked (not the X button of the current workbook but the X button of the main Excel window)?
Also, is the following the right way to make F1 key function like ESC key?
Thank you again.![]()
Application.OnKey "{F1}", "{ESC}"
EDIT: After too much hassle with no works-as-intended solution, I went ahead using AutoHotkey to remap F1 key to ESC key. In my over 20 years of Windows use, I don't ever remember using the F1 key to access Help of neither Windows, nor Office, nor any other program that I use. So mapping F1 to ESC with AutoHotkey is just what I needed.
Last edited by excelgenius; 02-01-2024 at 03:44 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks