When you try to open and work on a Microsoft Office Excel Sheet on your Windows/Mac device and you see the error "Microsoft has blocked macros from running because the source of this file is untrusted." well this be because
If an Excel (xlsx or xls) or other office files you download from the internet that has VBA macros in them, there is a potential that it may contain a malicious script that can gain access to your device and deploy malware and ransomware. Thus Microsoft has changed the default behavior of Office applications to block macros in files from the internet.
How to unblock files with VBA Macros
- Open the file in Office App (Excel/Word/PowerPoint)
- Now go to General tab -> Properties.
- Now select the Unblock checkbox.
Note: You can also make use of the PowerShell CMDLet Unblock-File
Example:
PS Unblock-File -Path C:\Users\Code2care\Documents\Downloads\ExcelSpreadSheet.xlsx
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
- How to Run JavaScript on Mac Terminal
- Get Current time in GMT/UTC using JavaScript
- How to yarn reinstall all Packages
- [javaScript] Convert text case to lowercase
- Get Device Screen Width and Height using javaScript
- Fix - npm start: sh: index.js: command not found
- npm WARN saveError ENOENT: no such file or directory, open /mnt/c/package.json
- JavaScript : Get url protocol HTTP, HTTPS, FILE or FTP
- JavaScript: Convert an Image into Base64 String
- JavaScript : Get current page address
- How to get query string in JavaScript HTML location.search
- Create React App using npm command with TypeScript
- JavaScript: Count Words in a String
- Add Animated Scrolling to Html Page Title Script
- How to send email from JavaScript HTML using mailto
- Javascript convert text case from uppercase to lowercase
- Submit html form on dropdown menu value selection or change using javascript
- Send Extra Data with Ajax Get or Post Request
- Fix: SyntaxError: The requested module does not provide an export named default
- Examples: Convert String to int in JavaScript
- 10 ways to Convert String to a Number in JavaScript
- Excel Fix: SECURITY RISK Microsoft has blocked macros from running because the source of this file is untrusted.
- Fix: ReferenceError: require is not defined in ES module scope [Node]
- [JavaScript] Remove all Newlines From String
- How to detect Browser and Operating System Name and Version using JavaScript
- Check if a Java Date String is Valid or Not (Java 8) - Java
- AlertDialog with single button example : Android - Android
- How to use SCP Command to Copy Directory - Linux
- Twitch chat down, error loading data, content unavailable, streaming problem - News
- Fix: type argument is not within bounds of type-variable T - Java
- How to add Newline to text in Android TextView - Android
- Fix - A JavaScript error occurred in the main process - Microsoft Teams - Teams
- How to lock cells in Microsoft Excel for Mac - Windows