A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi, alice 薛
Office Home 2024 supports VBA macros. Excel security settings may block macros from running, especially in downloaded files, but they should not normally delete the VBA project. If the code is genuinely disappearing, the file may be getting saved as .xlsx or modified by an organization security policy.
Here are some suggestions you can try:
First, make a backup of an affected file. Confirm its extension is .xlsm or .xlsb, not .xlsx. When saving, select Excel Macro-Enabled Workbook (*.xlsm). Macro-containing Excel files require a macro-enabled format.
Move one test file to a local folder such as Documents. Right-click it, select Properties, check Unblock if shown, then select Apply. Files downloaded from the internet or received as attachments can have their macros blocked.
In Excel, select File > Options > Trust Center > Trust Center Settings > Macro Settings, then choose Disable VBA macros with notification. Reopen the file and use Enable Content only if you trust it. Avoid enabling all macros globally.
Since Windows 11 Enterprise is organization-managed, check whether those settings are locked. If they are, contact your IT administrator because Group Policy, antivirus, or file-sanitizing software may be altering the workbook.
Test with a copied file rather than the only original.
Thank you for your patience in reading, I hope this information has been helpful to you.
If the answer is helpful, please click "Yes" and kindly upvote it. If you have extra questions about this answer, please click "Comment."
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.