I am about to create a master plan that will contain over 200 small sub project files. Each sub project file will have common elements such as standard Custom fields.

I have created a template for the sub projects and will now replicate it for each of the 200+ projects and them distribute them to the relevant Project Managers. My worry is that after creating these 200+ project files I will realise I need to make an identical change to all of them. EG Add a new custom field to each file, or modify a drop down list in each file, or add a new filter to each file.

Is there a way, presumably using VBA, that will allow me to apply the change to all the sub project files via one instruction? EG if I want to show custom field Date1 (renamed to TargetDate) in each sub project file, what is the best way to do this other than modifying each file manually one after the other?



1 Answer 1


The following code will add the field Date1 (which I have renamed as "PSR Finish") to all the sub project files in the Master file.

Dim mProj As Project, sProj As Project
Dim mProjName As String, sProjName As String

Set mProj = ActiveProject
mProjName = mProj.Name

For Each Subproject In mProj.Subprojects
    FileOpen (Subproject.Path)
    Set sProj = ActiveProject

    sProjName = sProj.Name
    OrganizerMoveItem Type:=9, FileName:=mProjName, ToFileName:=sProjName, Name:="PSR Finish (Date1)"

Next Subproject

Is this the best way to do this?

  • 1
    Yes, using the Organizer is a great way to do it. However, 1) given the large number of subprojects, you should close each one after updating it, and 2) set Application.Alerts - False before your loop starts so that if you rename a field that already has a custom name you won't get prompted to confirm the change. Oct 2, 2018 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.