Search code examples
excelvba

Getting System Error &H80070057 (-2147024809)


I've been running a workbook with a few macros in it for a couple of years, and I've suddenly started getting this error thrown at me for some navigational buttons (shapes linked to macros that are simply ThisWorkbook.Sheets("sheet_name").Activate).

Other Macros within the workbook seem to work OK, but I can't get into the VBA editor to see any of the code anymore - I get to the VBA interface, but when I go to open the Module, nothing happens.

And to cap it all off, when I try to save the workbook, I'm just getting an error saying 'Document not saved'.


Solution

  • I had the same issue. I opened the VBA code module and then selected Debug then Compile VBAProject. I then closed the Visual Basic Editor and the error seems to have been resolved. Have only had the issue the once so can't be 100% sure it will work in every instance but worth a go.