Solved Visual Basic Is CORRUPT!

khodor

Member
Local time
Today, 13:29
Joined
Feb 2, 2021
Messages
39
Hi everybody
After I created an Access file and worked on it for a while, My Laptop became so slow, so I decided to add SSD hard disk to make it faster, and I Formatted the C Hard Disk, then I re-downloaded the Access program but when I accessed my access file gives me this message:
the visual basic for applications propject in the database is corrupt
What Shell I Do?
 
1. Does the file open at all?
2. Can you import the objects into a new database?

It sounds like it might be too late but try a decompile and recompile (if possible at this point).
 
If you can open the db but not run a form or report, you can save and load from text as the last attempt.
 
Hi Thanks for your reply
1) Yes It open the databases, forms and tables but they are not working
for example I have a login page when you open the document, the form appears but when you press submit nothing happens
2) No I can't import it, The same message appears.
I tried these steps but nothing is working
I Can't enter vba
 
Last edited:
Did you try the decompile? I am not hopeful, but you have to try that first.
 
No Backup then?
Can you create a test DB and try and import from bad DB?
 
If you can open the DB and actually see the code in the module (just can't run it) then you could TRY to export the VBA code to a TEXT file. That would perhaps help.

If you have another DB of any other Access subject, can you open and run that? (Trying to eliminate possibilities here...)
Can you try to do a re-install of Office with the Repair option? That sometimes helps.

Make a copy of the DB (use the file explorer and do a copy/paste... just in case it goes funky on you) and try to Compact & Repair on it. NEVER do that to the last & only copy of the DB.
 
A wild guess here, is it possible that there is a reference missing in the visual Basic ?
1631112006506.png

I had problems with excel VBA once and it is a pain to fix.
 
it's not a simple reference issue. the VBA is corrupt, so it is not viewable.
 
it's not a simple reference issue. the VBA is corrupt, so it is not viewable.
In some cases, this can prevent you from opening the VBA editor. To fix it, I had to find an old office install with the correct reference and remove the bad one.
In any case, I hope he can still retrieve his code...
 
I may be able to recover your application depending on how badly corrupted it is.
However doing that would be chargeable in terms of the time required.
If interested, either send me a PM or email me
 
Hi everybody
Good News
I sent the access file to another laptop and it worked well
I tried to repair access but the same problem occurs
now I Have to focus on the difference between the two laptops:D:D
Thanks For Your help
 
do not mixed edit your db on x64 and x32 msa.
 
If it works correctly on another system, that points an accusing finger at the machine you WERE using originally when you reported the problem. There are TWO places to consider as prime candidates for the "offending" machine.

1. Reinstall Office with the Repair option. The Office files are, of course, installed to the local drive and thus part of "machine-specific" stuff.

2. References are affected by the registry, which is also unique to each machine. Compare the references on the working machine vs. failing machine. Remember that the references can be moved up or down in reference order - by highlighting a reference and then using the up and down arrows to the right. Make the references match, not only in what is checked but the order in which they appear.

IF you can export your VBA code to text files using that other system, you can easily import the files later in case your code needs a total restoration. Remember to export both class modules and general modules. Access will want to do those exports one module at a time.

Arnel's comment about 32-bit vs. 64-bit is also appropriate.
 
Thanks a lot @arnelgp and everybody replied in here
the problem was because of 32bit and 64 bit
when I changed office to 32 bit the problem was solved
Thanks a lot
 

Users who are viewing this thread

Back
Top Bottom