VBA File Not Found!

G

G Lykos

Greetings! In playing with MS Project Pro 2003 VBA , I periodically manage
to unknowingly clobber a file reference, resulting in a persistent "File Not
Found" message when entering IDE via Alt-F11. After acknowledging the
message, I proceed to edit and run the program seemingly normally. I would
appreciate some guidance on what I might be doing that causes this to
happen, and on what to do to fix it.

Thanks!
George
 
G

G Lykos

Further information - upon entering the VBA IDE, after acknowledging the
various "file not found" messages, VBA Project Explorer shows the
ProjectGlobal entity (only); no VBAProject entity appears. This is
probably what the "file not found" diagnostic message results from. Once
past that opening error message, I'm able to edit and run VBA code in
ProjectGlobal modules just fine.

A new project behaves normally, having a VBAProject in addition to the
ProjectGlobal, so the problem would appear to be in the project file. I
have, among other things, tried exporting the sick project to an .MPD file
and then reconstituting it, and the problem appears to follow it out and
back unchanged, somehow carried along in the database.

Have searched the Internet but have been unable to locate any guidance on
some method to re-establish the VBAProject entity (library, if that's what
it is) in the project file.

This has happened before. Although I can copy data from the sick project to
a new project, I'd really prefer to avoid losing all the setup this time.
This isn't the first time this has happened, so some kind of recovery
procedure would be really helpful. Project Professional 2003 SP-1, if it
matters.

Thanks!
George
 
G

G Lykos

And a thought that occurred - if database corruption interfering with the
VBA library access in the project file is being exported in the .MPD file,
and if that file can be read and edited in Access, then perhaps the problem
could be fixed in it and then read back into Project in reconstituting a
Project file. Any sharp software-types out there familiar with the
structure of the .MPD file related to this aspect that could provide some
guidance?

Thanks again!
George
 
R

Rod Gill

Try opening the project again then select file, save as to a .mpp file
format then save back to .mpd if you want to after deleting the original
project in the .mpd file.

pjdb.htm is on you hard drive and details the database structure.
 
G

G Lykos

Rod, on a Web search for 'VBAProject missing', you turn up as having fielded
a same inquiry last year - would appear that this is a known problem in
Project. Do you remember if the source of the problem was indentifed,
and/or what solution was (hopefully other than start over)?
http://www.tech-archive.net/Archive/Project/microsoft.public.project.vba/2004-08/0012.html

Not sure about your guidance below - the native file format is .MPP. Did
you mean to open the .MPP file, save off as an .MPD, then open the .MPD and
save back to .MPP? Tried that before I posted - didn't help.

Further details - this 'snapped' last week. Opened the file from another
computer with the same results, so it appears that the program copy is not
bad (at least, is no worse than when it started). Opened file backups from
before the problem appeared, and they now show the same problem - kind of
crazy! There are external links in the schedule to spreadsheets, some of
which were moved but the references were not updated. I'll look at pjdb.htm
to see what it has to offer.

Regards,
George
 
R

Rod Gill

I think that post was about not being able to find the code that did the
work. This answer was to search forms and the project object.

When you select Debug, Compile there are no error messages?

Check all references are ok (no MISSING messages).
 
G

G Lykos

Actually, both posts (there were two different incidents posted within days
of each other) reported that the VBAProject(Project 1) entity for the
current schedule disappeared from the VBA IDE Project Explorer, which is the
same thing that I have experienced.

After opening the problem file and getting the VBA window open (with 'file
not found' messages), I then did the suggested Debug | Compile
ProjectGlobal, which completed without any messages - and the problem
continues.

Also noticed that when opening the Macros window and selecting "Macros in:
This Project and trying to Create one, I get the same 'file not found' error
message. Either the VBA library in the schedule file, or the pointer to it,
appears to have been corrupted.

Any other ideas on how to repair it? Thanks!
 
N

nico

I can confirm having the same trouble now with file missing as well when
opening the IDE, the Manager macro window and when closing down a project.

If there is a solution I would like to know what can be done. Tried the
saving in different formats and loading back which was whithout results for
me as well.

Not a helpfull post but at least you're not alone :)
 
G

G Lykos

Welcome to the club, but I really wasn't hoping to have company - this is a
pain.

Never got any guidance on recovery. Where I ended up was to copy the data
over to a new schedule. First calendars, then resource sheet, then the
tasks in one swell foop. Then I got to practice setting up the column
headings, time-line scaling, print formats, etc. again manually -
fortunately, customization here was minimal and tracking hadn't started yet.
Go through this a few times, you get pretty quick at it (a competency I
wasn't particularly interested in developing). Maybe someone has a macro
that will export/import all this stuff - it must be accessible via VBA.

Cheers!
George
 

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