none
Unlink subprojects programmatically RRS feed

  • Question

  • Hi, I have circa 40 subprojects in a master file and I want to be able to quickly "unlink" them (Task Dialog Box/Advanced tab/uncheck Link to project).   Is there a VBA approach to achieve this or must I uncheck each one individually in order to create a fully consolidated single project?

    Thanks in advance,

    Steve

    Wednesday, December 20, 2017 2:46 PM

Answers

  • Steve,

    Sure, incorporate the following code into your macro.

    While ActiveProject.Subprojects.count > 0
        For Each subproj In ActiveProject.Subprojects
            subproj.LinkToSource = False
        Next subproj
    Wend

    Hope this helps.

    John

    • Marked as answer by Stev Scott42 Wednesday, December 20, 2017 6:47 PM
    Wednesday, December 20, 2017 5:32 PM

All replies

  • Steve,

    Sure, incorporate the following code into your macro.

    While ActiveProject.Subprojects.count > 0
        For Each subproj In ActiveProject.Subprojects
            subproj.LinkToSource = False
        Next subproj
    Wend

    Hope this helps.

    John

    • Marked as answer by Stev Scott42 Wednesday, December 20, 2017 6:47 PM
    Wednesday, December 20, 2017 5:32 PM
  • thanks John
    Wednesday, December 20, 2017 6:48 PM
  • Steve,

    You're welcome and thanks for the feedback.

    John

    Wednesday, December 20, 2017 8:04 PM