File Open without showing dialog boxes

M

Mike

I've created a macro in MS Project 2002 that opens
other .mpp files, processes them, and closes them within a
For Loop.

The problem is, that is I am also using a resource pool
with each of the .mpp files and a diaglog box appears upon
opening the .mpp's asking if I want to open other
associated files as well.

Bottom line: I don't want any dialog boxes to open during
execution of the macro, I want it to run without human
intervention.

I haven't been able to figure out how to code the open
file line of code so the dialog box doesn't appear.

Can anyone send the required line of code to do this to
this forum?

Thanks, I'll be checking in a few times today and this
week to see if anyone responds.

Mike
 
J

John

Mike,
I don't know if either of these will work, but you might try the
"Alerts" method or the "DisplayAlerts" property. The latter is more for
error messages and opening the resource pool is normally not an error.

Alerts(false)
DisplayAlerts = False

Hope this helps.
John
 
D

Dale Howard [MVP]

Mike --

If memory serves me correctly, place the following line or code at the
beginning of your macro to turn off the display of dialog boxes

Application.DisplayAlerts = False

At the end of the macro, place the following line of code

Application.DisplayAlerts = True

Hope this helps.
 
J

Jan De Messemaeker

Hi Mike,

Display Alerts does not filter all requests at open, unfortunately
You have to tune the fileopen method
FileOpen name:="So and So",openpool:=pjdonotopenpool
HTH
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
Project Management Consultancy
Prom+ade BVBA
32-495-300 620
 
J

John

Dale,
Just for reference, the help file says "DisplayAlerts" is automatically
reset to "True" when a macro finishes.

John
 
D

Dale Howard [MVP]

John --

Fair enough. I haven't written a line of VBA code in more than a year, so
my memory is hazy. Thanks for the clarification.
 

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