Keyboard Macros vs Excel VBA Macros at Work
Two things share one name. Here is how they differ and which rule applies to each. Part of our guide to keyboard macros at work.
- What each kind of macro is
- How Office blocks internet macros
- Which approval rule applies
Two Different Things Called Macros
A keyboard macro is a saved trigger that types text or presses keys, while an Excel or Word macro is VBA code stored inside an Office file. They are separate, and Microsoft blocks the second kind from the internet by default.
The word “macro” covers both, which is why a safety rule about one gets applied to the other. Your employer’s rule on Office macros says nothing about a text expander, and the reverse is also true. Each needs its own approval question.
| Point | Keyboard macro | Excel or Word macro |
|---|---|---|
| What it is | A trigger that sends text or keys | VBA code inside a document |
| Where it lives | A macro tool’s own file | The Office file itself |
| How it spreads | You install a tool | A file arrives by email or download |
| Main risk | An unapproved tool; secrets stored in text | Malicious code run when a file is opened |
| Default block | None; IT policy decides | Blocked from the internet by Microsoft’s default |
How Office Blocks Internet Macros
Office blocks macros in files from the internet through the Mark of the Web, a flag Windows attaches to downloaded files. Microsoft rolled the default block out from April 2022 and extended it to Publisher in 2023 and Project in 2024.
When you open a flagged file, a red “security risk” banner appears. The Unblock checkbox in the file’s Properties removes the flag, and a Group Policy named “Block macros from running in Office files from the Internet” can enforce the block. The behavior applies to Office on Windows.
The UK’s NCSC and Australia’s ACSC both advise turning Office macros off unless there is a business need. That advice targets VBA. It is not guidance about typing tools.
Which Rule Applies to You
If a file asks you to “enable macros”, the Office rule applies and you should stop and ask. If a tool types text for you after a hotkey, the software-approval rule applies. Know which one you are looking at.
- Never enable macros in an unexpected attachment. This is the classic route for malware in Office files.
- Ask before installing any typing tool. The approval guide shows how.
- Keep the two separate in your request. Tell IT you mean a keystroke tool, not VBA.
A text macro tool such as Macro Keys types text into an open Excel cell. That is not an Excel macro, but it does fall under software approval.
For the overall safety answer and the three-question test, return to the main guide.
Why You Should Not Automate the Enable Button
A keyboard macro could press the Enable Content button for you, but that click is the one control Office gives you to stop and think. Automating it removes the only check between a file and its code.
Microsoft’s warning banner appears because the file carries the Mark of the Web, and the button is how a person says “I know where this came from.” A macro that clicks it every time says that for every file, including ones you never read. Security teams treat that as a reason to block the tool outright.
- Fine to automate: typing a standard note into a cell, or moving between fields with Tab.
- Not fine to automate: Enable Content, Unblock, or any prompt that asks whether to trust a file.
- Ask first: any macro that opens, saves or sends workbooks on its own.
If the workbook holds customer or payroll data, keep it in a protected location. The Folder Lock product page describes password protection for folders on Windows, which is a separate job from controlling macros.
Treating “macros are blocked” as a fault to fix. The block is Office doing its job, and the person who owns the file’s security should decide whether to lift it.
Questions About Vs Excel macros
No. VBA is code stored in an Office file. A keyboard macro tool types text or presses keys from a hotkey, outside Office.
The file came from the internet and carries the Mark of the Web flag, so Office blocks its macros by default.
Only if you trust the source and your IT policy allows it. If unsure, ask IT first.
A keyboard macro can press keys that open the editor, but doing so is a scripting task for IT review, not a text macro.
It could, but it should not. That click is the check Office uses to make you look at the file first, and automating it defeats the warning.
No. The block applies to VBA macros in Office files, not to separate typing tools.
Where to Go Next
Need a typing tool, not VBA?
Macro Keys is a free Windows tool that types stored text from a short trigger.