VBA code disappears from file

S

Sverre Lenes

I have a MPP-file where all VBA-code suddenly disappeared. The code was
plain, nothing fancy. The project file don't show in the Project Explorer.
Neither do the procedures show in the macro list. I am using MSP 2002. I
can't figure what's causing this, but suspect it can be related to som
stability problems in the network where the file is stored. From time to time
I get the message "the file is read only..." at saving time, and I have to
use Save As and then replace the existing file. Please help, someone!

sverre
 
J

John

Sverre Lenes said:
I have a MPP-file where all VBA-code suddenly disappeared. The code was
plain, nothing fancy. The project file don't show in the Project Explorer.
Neither do the procedures show in the macro list. I am using MSP 2002. I
can't figure what's causing this, but suspect it can be related to som
stability problems in the network where the file is stored. From time to time
I get the message "the file is read only..." at saving time, and I have to
use Save As and then replace the existing file. Please help, someone!

sverre

sverre,
I've heard of this happening before but not for a long time.
Unfortunately, based on what you said about your network sometimes being
interrupted, my guess is that either the file was corrupted or the
attached macros are lost. This is a long shot, but you might try the
things suggested in FAQ 43 - File Bloat? Might be corruption. All our
FAQs can be found on our MVP website at:
http://www.mvps.org/project/faqs.htm

The best defense against stability problems is to save often. I suggest
you keep a copy of your Project Global either on your hard drive or on
removable media and update it frequently. If there are customized
options and/or macros that are not in the Global (i.e. attached to a
specific Project file), then keep those in a blank file, also stored on
your hard drive or removable media.

John
Project MVP
 
S

Sverre Lenes

It din't help but thanks anyway. The file file is most likely corrupted. I
tried to record a macro and store it in the file but receives the message
that the macro name is not valid, which is nonsense. The strange thing is
that everything else is normal. Anyway I copied the tasks to a new file and
restored most of the VBA code from an old file. So now I'm up and running
again.

sverre
 
J

John

Sverre Lenes said:
It din't help but thanks anyway. The file file is most likely corrupted. I
tried to record a macro and store it in the file but receives the message
that the macro name is not valid, which is nonsense. The strange thing is
that everything else is normal. Anyway I copied the tasks to a new file and
restored most of the VBA code from an old file. So now I'm up and running
again.

sverre

sverre,
You're welcome. I'm glad you had the backup information to re-create
what you need. Unfortunately many users do not perform the critical
routine backups and when they have a major crash, they're dead.

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top