VBA Project Inaccessible, Invisible, Deleted or just Gone

M

Marcus Wolfe

I have a resource pool file created in Project Standard 2003. It opens and
runs properly, as far as I can see, and when it opens it gives me the usual
msgbox about whether to run macros, but when I open Visual Basic there is no
VBA Project for that file. There used to be one, with several modules I'd
created. Now I can't even import the modules again as there is no VBA Project
to import them to. This has happened a couple of times and I'm resigned to
having to use the backup of the resource pool because I'll never get that VBA
Project back, but I would like to understand why this happened so I can avoid
it in future, if possible.
 
R

Rod Gill

One possible cause is the resource pool has a corruption. If anyone renamed,
moved or over-wrote with a new version any of the projects linked to the
resource pool, then a corruption will happen sooner or later. That is the
nature of the old DDE link technology.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
M

Marcus Wolfe

Rod, thanks, I'll stop doing those things for a start. Your excellent book
hasn't been further than an arm's length away for about six months now.
When you say "old DDE link technology" do you mean this is less likely to
happen with Project 2007, or are you referring to a difference between
Standard and Server?
 
R

Rod Gill

It will happen with all version of Project with any links: tasks linked
between files, resource pools, inserted project with link and any copy paste
link

Thank you for your kind words about the book!

If you think there are any missing things for project vba I haven't covered,
email me. I can post extra tips and fill in any gaps on the
projectvbabook.com site.
--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
P

Peter W. Avery

Rod:

I just found this thread and have been having a similar problem with the VBA
Project missing from regular MSP Schedule files. They were created before I
arrived at this position, so I don't know if they ever contained links to
other files or not, although I am quite sure that they do not have any such
links at present.

I have tried exporting to XML and reimporting, but receive an error message
about not being to open the imported file. I found a KB article somewhere
about this - the Workweeks object in the new 2007 model apparently causes
problems in certain cases, and some future patch may fix that problem.

In the meantime, I also tried inserting the schedule file into a blank
project created from a clean GLOBAL.MPT, unlinking the inserted project from
the original file, outdenting the second line (and below) and deleting line
1. This does fix the VBA Project issue, but some of the data (especially the
Cost Table) is altered or missing, to the point where the new file is not
useful.

I have also tried copying the defective schedule's views, tables and other
properties to the GLOBAL.MPT via the Organizer and closing everything. Then
I opened a blank project with the updated GLOBAL.MPT and did the file insert,
but the Cost Table data was still messed up.

Just for kicks, I also have tried all of these recovery methods in MSP 2003
with varied results.

Is there any way, using VB, Visual Studio or otherwise, to reattach or
recreate a VBA Project part to the defective schedule files? In some Office
products, calling the VBProject property will create a new VBA Project if
none exists, but in MSP this property appears to be read only, and merely
returns the "File Not Found" message.

Thanks in advance for any insights.
 
R

Rod Gill

At first reading, it sounds like your project has some corruption. If saving
to xml didn't work, then manual restoration is the only way.

Copy what you can manually then everything else will need to either be
copied for a backup pre-corruption or manually re-entered I think. I'll
think on it and post again if I think of anything else.

Make sure you have 2007 SP1 installed as SP1 fixes some corruption causing
problems.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

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