how to check that a subproject's location has been changed

J

Joy

I use the following codes to open a project's subprojects, do something and
then close it

Dim subproj As Subproject, projID As String
'go through all the subprojects in the file
For Each subproj In proj.Subprojects
On Error Resume Next
'open them all in turn
FileOpen Name:=subproj.Path

FileClose (pjSave)

Next subproj


I notice that if I save the master project. close all projects. and make
changes to a subproject's file location, like I change the file name or
delete it. then I run the above macro

the ms project will have error, and aske me to send error report ...

What I can do to check that a file's location is correct and open it?? how
to make the macro robust?

thanks
 

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