How to Programmatically 'OK' Warning Messages at File Open

M

Mike McCandless

I am looping through a directory of .mpp files using VBA from Excel,
and have set the Project application to be visible, mainly for
debugging. On some, but not all, of the project files, I get
scheduling/other Project warning messages. These have nothing to do
with the VBA activity, I get them opening the file w/o VBA.

My question is how I can programmatically, in VBA, deal with the
warning messages so that I don't have to babysit this process.
 
J

John

Mike,
There are a couple of "disablers" you can try. One is:
Application.DisplayAlerts = False
Where "Application" is a Project Application object reference

The second is to disable showing scheduling messages for Project. And,
maybe disabling the Planning Wizard (although this probably isn't
relevant). They are both Global settings for Project and can be accessed
through Tools/Options/(Schedule tab and General tab).

Hope this helps.
John
 
J

Jan De Messemaeker

Hi,

And finally, for the very stubborn ones (like when the file is a resource
pool) I use the following

Sendkeys "~" 'This sends an "Enter" keystroke when control returns to MS
project
Fileopen.....

HTH
 

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