0

My VBA Project seems to be corrupted. When I try to open a module I get a "Module name 'xxxx' is misspelled or relates to a module that doesn't exist". This all seemed to happen after a run time error inferring a corruption had taken place. I have tried to open Access in decompile mode and then open the data base, but still no luck...though I'm not sure how you tell its in decompile mode. I'd desperately like to get some code out that I've been working on for a couple of days.... I can open the tables and queries, so it seems its just the VBA project.

Any ideas? is there a way of accessing the modules outside of the data base?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • 1
    How are you opening Access in decompile mode? Is it via a `.bat` file with the a line like: `"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "d:\My Documents\myAccessDatabase.mdb" /decompile`? – Matt Hall May 04 '16 at 07:34
  • If you're still able to run some kind of script on the file, you could adapt the VBA described on this thread to try and export out your VBA modules to a text file http://www.utteraccess.com/forum/lofiversion/index.php/t2019941.html – Matt Hall May 04 '16 at 07:40
  • 1
    **[Decompile](http://stackoverflow.com/a/3268188/3820271)** - follow these steps to the letter. – Andre May 04 '16 at 08:25
  • ok...been away but thanks for your prompt replies. I will let you know how I go. – Laurence Lock Lee May 06 '16 at 20:43
  • ok I've just tried the command line decompile step but I get the "Database cannot be opened because the VBA project contained it it cannot be read...."...which is what I am trying to recover. – Laurence Lock Lee May 06 '16 at 21:22
  • I can try the VBA script by creating a new module to run it, but will I run into the same problems as it doesn't seem to be able to address the existing modules any more? – Laurence Lock Lee May 06 '16 at 21:24
  • Import the all but the modules into new database and then import the modules from a backup. – BitAccesser May 06 '16 at 23:26
  • Unfortunately no recent backup (I know...)... Tables are fine. – Laurence Lock Lee May 08 '16 at 08:26

0 Answers0