0

We have a large, complex workbook that is sync'd across 4 users with OneDrive.

Almost every week, we'll open the workbook and it will be corrupted - usually all of the macros have disappeared.

The workbook is of course saved as .xlsm.

We are all using Excel 365 64bit.

Possible red herring: Due to issues with OneDrive in the past (before my time). The team have a script that kills Excel at the same time every night. Although, the macros being deleted is a new issue. Plus I find it hard to believe that OneDrive would save an incomplete version without some kind of warning / roll back to previous version.

Any ideas as to what could be causing this?

5
  • it sounds like it is something in the workbook that is the issue, not onedrive, when you open the corrupted workbook, i assume excel is then trying to repair it, and if you're macros are then missing it could be that there is something in the macro causing the issue. i could be totally wrong but that's the route i would investigate first
    – PeterH
    Mar 19, 2021 at 14:37
  • @PeterH given that macros are just text, and that we don't have any macros which modify other macros, I'm not sure what could be in the macros that would cause this. Can you give me some indication as to what you think could be in a macro to make them disappear?
    – Griffin
    Mar 19, 2021 at 17:32
  • not really, just saying that is where i would start, try isolating the problem or re-creating it another workbook, trying one macro at a time, once you know the cause it should be easier to fix
    – PeterH
    Mar 21, 2021 at 12:54
  • Maybe one of the users has his security settings tightened, and when he opens the sheet, all macros get removed? Try open/save on all four machines in sequence, and check each time if the macros are gone.
    – Aganju
    Mar 25, 2021 at 17:52
  • The other idea is that someone leaves the sheet open and goes home - the reset would then force a recovery of the file, which destroys the macros.
    – Aganju
    Mar 25, 2021 at 17:53

0

You must log in to answer this question.

Browse other questions tagged .