0

A specific xlsm workbook crashes when I try to save, save as, or when I open the VBA editor. I've tried disabling macros, removing auto calculations, etc. I can't actually get to the code to see if there's a bug causing the crash due to the editor itself causing crashes.

Edit: Also forgot to mention there are links to another workbook in the file - but removing auto-updating/calculating upon save doesn't seem to help. Also, I'm able to modify the workbook, I just can't execute the macros, save, or open the VBA editor.

Edit2: Some additional info. I tried deleting all worksheets and still have the same problems so there must be something wrong in the code.

Looking for a solution to salvage the workbook.

Fubudis
  • 241
  • 3
  • 6
  • 17

1 Answers1

1

Remove the VBAProject.bin file from the .xlsm file:

  • copy the .xlsm file
  • change the extension of the copy to .zip (say Yes to the warning about changing extensions)
  • open the ZIP file
  • open the xl folder
  • cut the VBAProject.bin file and paste it to somewhere outside the ZIP file
  • rename the ZIP file back to a .xlsm extension

You should now be able to open the .xlsm file in Excel but it will no longer have any macros.

It is theoretically possible to reconstruct the macros from the VBAProject.bin file using the resources linked to in this answer but this may involve considerable effort

Community
  • 1
  • 1
barrowc
  • 10,444
  • 1
  • 40
  • 53