Dear AndyLH2,
Good days, thanks for querying in this forum. We’re happy to help you.
From your description, it seems that you always edit the files with VBA code which are saved in OneDrive, and you want to disable AutoSave for them.
If my understanding above is right, to verify your assumptions, we’d suggest you go to Excel > File > Options > Save > unselect AutoSave OneDrive and SharePoint Online files by default on Excel, as shown below:
Then you can check if it will work.
If the scenario above is not consistent with yours, you can also post back and point that.
Thank you for your cooperation.
Sincerely,
Sukie | Microsoft Community Moderator