Hi kandiyohivwork,
As per your description, this is really abnormal behavior as you encounter. This might be a different cause and it very hard to find an exact root cause of this issue.
As you mentioned, “I had a backup copy on a network drive that hasn't been touched since June 2021. I opened it up last night and it too was missing all the code.” may I know does issue happened to only specific Excel Macro “.xlsm” file workbook? If the issue only happens to a specific file, the file may be corrupted somehow. In this scenario try to copied and pasted the code into other workbooks and see if there is any difference.
If the issue happens to all Excel “.xlsm” file including a new created one stored in your SharePoint 2016 server or in your network drive, the issue is more related to the Office app itself or your computer environment. You can first try suggestions below to see the result:
- Make sure you’ve updated Office to the latest version that some issues can be resolved with such method.
- Try open your Excel insafe mode which allow you to safely use it when it has encountered certain problems
- If still can’t work, please try torepair an Office application to fix the problem.
In the meantime, I can’t reproduce the issue in version 2108 (14326.20238) Current channel. To confirm whether this is a bug in a specific version, please provide us the version information. To check version: Open any Office e.g., Excel>File>Account>Product Information and capture a full screenshot and share here (Please mask your private message for protecting your private message) and we will be tested on that version and verify the result with you.
I appreciate your understanding and stay safe!!
Best Regards
Waqas Muhammad