Monday, June 8, 2015

windows 10 - Excel "Can't find Project or Libary" - but which one?

Using Office 2016. I have an Excel file with VBA. Whenever I open it, I get the error "Can't find Project or Library". Excel immediatlely closes.


I opened Excel and, without opening the file, looked at References. There was one labeled "UNSAVED: VBA Project". When I tried checking it, I got an error. (Sorry, I don't remember exactly what it said -- something about having to save it when the file was open.)


Since the, the "UNSAVED: VBA Project" has stopped appearing. There are no entries that say "MISSING".


Open-and-Repair (on the real version) causes the same crash. Opening in Safe Mode doesn't help the issue. However, I can open it in Protected View without its crashing.


I saved a copy without VBA and it worked.


ADDITIONAL: There's a pivot table in the workbook that's connected to an external database.


There's also a Workbook_Open macro that asks the user if he/she wants to run a second macro that updates the pivot table. However, when I block the macros from running, the file still crashes without the Workbook_Open, so the pivot table never tries to update.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...