Cheese Board
Cheese Board

Reputation: 21

The database cannot be opened because the VBA cannot be read

I have an Access, 2007 – 2016, accdb database on my Toshiba Satellite Pro running Windows 7 32 bit. I am using MS Office 365.

The database that opens at its home page, but any attempt to open a table, form or module brings up this message:

“The database cannot be opened because the VBA project contained in it cannot be read…”

I have 2 backups of this database, but they do the same thing.

I have read several posts on the internet that indicate that the problem can be solved by decompiling the database.

I have tried the VBS Script solution contained in:

How does one decompile and recompile a database application?

However, it does not get to decompile as the same message displays when the .vbs file opens the database.

I have read some other posts that indicate a problem with a VBA7 file, but these refer to Access 2010, so I do not know if they also apply to me. I have VBA7.1 by the way.

Attempts to decompile through the Command Prompt has its own problems that seem to be associated with file names with spaces.

So, I’m stuck. Any help would be much appreciated

Upvotes: 0

Views: 2070

Answers (1)

tjb
tjb

Reputation: 65

I ran into this same error at work, Have you tried shift-clicking and opening? I know that seems obvious, What I did, was I got the DB open in safe mode, and opened up a module in the vba editor, and tried to fight the problematic code, if anything you could delete all your modules after copying them into a notepad.

I also right clicked and restored previous versions from windows, I am not sure if you have tried this when you say you have to back ups, but i was unaware of this fix and i luckily had a version from last week that fixed my issue.

Upvotes: 0

Related Questions