none
Q's about forumals and fields RRS feed

  • Question

  • hi,

    i am trying to do the following and would appreciate some help.

    project 1, Text 1 = hello

        Task 1.1, Text 1 = hello (gets it automatically from parent project 1, Text 1)

        Task 1.2, Text 1 = hello (auto)

    Project 2, Text 1 = bye

        Task 2.1, Text 1 = bye (gets it automatically from parent project 2, Text 1)

        Task 2.2, Text 1 = bye (auto)

    I would like to enter hello and bye into the text 1 field of project 1 and project 2 but i would like the text 1 fields of tasks under project 1 and project 2 to automatically get that from the text 1 field of parents project 1 and project 2.

    Thank you for the guidance. If there is a book you know that addresses these things in detail pls do suggest. Thanks.

    MD


    MD

    Wednesday, May 30, 2012 5:57 PM

Answers

  • PP925 --
     
    What you want to accomplish cannot be done using a formula.  What you are describing is a free-entry Text field into which you want to be able to enter a value for one task, and then have the data roll up to summary tasks and roll down to subtasks.  As you describe this, I do not believe there is any way to accomplish this other than writing some code in the VBA programming language to accomplish this.  Hope this helps.

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    Wednesday, May 30, 2012 6:45 PM
    Moderator
  • PP925,

    I fully agree with Dale's recommendation of Rod's book for learning Project VBA.

    One website that has some nice examples of Project VBA code is Jack Dahlgren's site at, http://masamiki.com/project/macros.htm. We also may post simple VBA code on this forum in response to a question, such as yours. In that light, the following code will do what you want.

    Dim t As Task
    Dim st As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Summary Then
                For Each st In t.OutlineChildren
                    st.Text1 = t.Text1
                Next st
            End If
        End If
    Next t
    End Sub

    John


    Wednesday, May 30, 2012 8:27 PM

All replies

  • PP925 --
     
    What you want to accomplish cannot be done using a formula.  What you are describing is a free-entry Text field into which you want to be able to enter a value for one task, and then have the data roll up to summary tasks and roll down to subtasks.  As you describe this, I do not believe there is any way to accomplish this other than writing some code in the VBA programming language to accomplish this.  Hope this helps.

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    Wednesday, May 30, 2012 6:45 PM
    Moderator
  • Thanks. I understand. although i am new to vba and project but not to such concepts. if you could kindly suggest a book that might deal with these concepts in an integrated way then that would be great. also, if your aware of any sites or forums where such vba codes might be of interest for sharing and discussions then do share as well. thanks again.  


    MD

    Wednesday, May 30, 2012 7:03 PM
  • MD --
     
    If you want to write some VBA code, I heartily recommend the Microsoft Project VBA programming book my Rod Gill, available for purchase at:
     
     
    Hope this helps.
     

    Dale A. Howard [MVP]
    VP of Educational Services
    msProjectExperts
    http://www.msprojectexperts.com
    http://www.projectserverexperts.com
    "We write the books on Project Server"

    Wednesday, May 30, 2012 7:20 PM
    Moderator
  • PP925,

    I fully agree with Dale's recommendation of Rod's book for learning Project VBA.

    One website that has some nice examples of Project VBA code is Jack Dahlgren's site at, http://masamiki.com/project/macros.htm. We also may post simple VBA code on this forum in response to a question, such as yours. In that light, the following code will do what you want.

    Dim t As Task
    Dim st As Task
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Summary Then
                For Each st In t.OutlineChildren
                    st.Text1 = t.Text1
                Next st
            End If
        End If
    Next t
    End Sub

    John


    Wednesday, May 30, 2012 8:27 PM
  • thanks a lot Dale and John, that was cool.

    MD

    Wednesday, May 30, 2012 10:21 PM
  • MD,

    You're welcome and thanks for the feedback. Please mark this post as answered.

    John

    • Marked as answer by PP925 Thursday, May 31, 2012 2:25 AM
    • Unmarked as answer by PP925 Thursday, May 31, 2012 2:25 AM
    Thursday, May 31, 2012 12:39 AM