none
Hide rollup bars if task not collapsed RRS feed

  • Question

  • Hi!

    I set my tasks to rollup and formatted the rollup bars as I like with this arguments for Show For ... Tasks: Normal;Rolled Up;FlagX;Not Summary. All working fine and a great feature.

    Now this helps me to see what's going on in more detail when I collapse a summary task. But when I roll down the summary the Rolled Up bar stays in place, cluttering my overview. Is there a way to hide the rollup bars when a summary isn't collapsed?

    Tnx!

    Thursday, September 3, 2015 1:44 PM

Answers

  • Peperbusse,

    Okay, here you go. Note, this macro assumes all subtasks have the Rollup field set to "yes".

    'This procedure will toggle a summary line's Rollup field
    ' based on whether the summary is collapsed or expanded
    ' If collapsed, subtask Gantt Bars will roll up to summary level
    ' If expanded, subtask Gantt Bars will not roll up to summary level
    ' macro written by John - Project 9/4/15
    Sub RollupToggle()
    Dim t As Tasks
    Dim i As Single
    SelectTaskColumn
    Set t = ActiveSelection.Tasks
    For i = 1 To t.count - 1
        If t(i).Summary = True Then
            If t(i + 1).ID <> (t(i).ID + 1) Then
                t(i).Rollup = True
            Else
                t(i).Rollup = False
            End If
        End If
    Next i
    End Sub

    Hope this helps.

    John

    • Marked as answer by Peperbusse Monday, September 7, 2015 9:08 AM
    Friday, September 4, 2015 5:15 PM

All replies

  • Peperbusse,

    No, not easily. Just thinking about it for a minute, it might be possible to create a little macro to turn the summary level Rollup field to "yes" or "no" depending on whether the structure is collapsed or expanded, but is it really worth the effort to do that?

    John

    Thursday, September 3, 2015 3:15 PM
  • Hi John,

    Tnx for your reply. I look at a rollup as a summary, but with more detail. When I collapse a group of tasks, I want to see the summary. But if i expand the group it makes no sense to show a summary when I can see everything allready. So for me, yes, it is abolutely worth the effort and I will definitely look into the possibilty of a macro. I'm not into macro so if someone has any suggestions as where to start... They're more than welcome!

    Friday, September 4, 2015 1:57 PM
  • Peperbusse,

    Okay, here you go. Note, this macro assumes all subtasks have the Rollup field set to "yes".

    'This procedure will toggle a summary line's Rollup field
    ' based on whether the summary is collapsed or expanded
    ' If collapsed, subtask Gantt Bars will roll up to summary level
    ' If expanded, subtask Gantt Bars will not roll up to summary level
    ' macro written by John - Project 9/4/15
    Sub RollupToggle()
    Dim t As Tasks
    Dim i As Single
    SelectTaskColumn
    Set t = ActiveSelection.Tasks
    For i = 1 To t.count - 1
        If t(i).Summary = True Then
            If t(i + 1).ID <> (t(i).ID + 1) Then
                t(i).Rollup = True
            Else
                t(i).Rollup = False
            End If
        End If
    Next i
    End Sub

    Hope this helps.

    John

    • Marked as answer by Peperbusse Monday, September 7, 2015 9:08 AM
    Friday, September 4, 2015 5:15 PM
  • Hi John,

    Thanks a lot! It works perfectly fine. Need to run the script by hand after any changes, but that's ok! Thanks again!

    Monday, September 7, 2015 9:09 AM
  • Peperbusse,

    You're welcome and thanks for the feedback.

    John

    Monday, September 7, 2015 3:28 PM