The file format does not support macros. 1. The file format does not support macros. If your file is saved with the .xlsx extension, Excel cannot save VBA macros. This format is designed for data and formulas only, without code support. To save macros, you must use the .xlsm format (Excel Macro-Enabled Workbook). 2. How to change the file format. To resolve this issue, go to File > Save As, and then choose Excel Macro-Enabled Workbook (.xlsm) from the list of file types. This will allow Excel to save your macro in the ThisWorkbook module. 3. Macro security settings. Excel may block macros for security reasons. Check in File > Options > Trust Center > Macro settings that macros are not disabled. Enable the option to enable all macros (temporarily, if you are sure of the file's source) or enable macros with notification.
No comments yet