Forum Discussion
AnaPaulaGoulart
May 16, 2024Copper Contributor
Macro não funciona no excel para Mac
Eu fiz a configuração de um macro no minha planilha excel e ela não está funcionando, ficam aparecendo o erro abaixo:
Sendo que eu já fiz a liberação dos macros, conforme imagem abaixo:
E o meu arquivo também está na extensão .xlsm.
Fico no aguardo de uma solução.
- BodhiSunridgeIron Contributor
1. Basic checks
Enabling Macro Permissions
Open Excel > Preferences > Security
Select Enable all macros in Macro Security (for temporary testing)
Restart Excel
File formatting issues
Make sure the file is saved as .xlsm (macro enabled workbook)
Avoid using Windows created macros (compatibility issue)
2. Frequently Asked Questions Fixes
Macro button grayed out/unclickable
Check that the file was downloaded from the web/email:
Right click on the file > Show Profile > Check Unlock
Reopen the file
Runtime Error
Press ⌘ + ⌥ + F11 to open the VBA editor
Check for error messages in the Immediate window (Ctrl + G)
Modify code to adapt to Mac (e.g. replace Windows API calls)
3. Ultimate Solution
Reinstall Office
Uninstall Excel:
Access > Applications > Drag and Drop Microsoft Excel to Wastebasket
Reinstall from the official website
Use an alternative program
Switch to AppleScript (Mac native automation tool)
Migrate to Office Script (web-based Excel support)