none
display project summary task through macro RRS feed

  • Question

  • How can I display the Project Summary task with a macro? I know I can go to File-Options-Advanced, and scroll down and set it.  I would like to add a button on my main userform to toggle it.  Nothing is recorded when I record doing it manually and I can't get the syntax for the code.

    Thanks

    Ken

    Tuesday, June 25, 2019 2:39 PM

Answers

  • Hi Ken,

    I just tried to record a macro and I'm getting the following result:

    Sub Summary()
        OptionsViewEx ProjectSummary:=True
    End Sub


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller

    Tuesday, June 25, 2019 2:55 PM
    Moderator

All replies

  • Hi Ken,

    I just tried to record a macro and I'm getting the following result:

    Sub Summary()
        OptionsViewEx ProjectSummary:=True
    End Sub


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller

    Tuesday, June 25, 2019 2:55 PM
    Moderator
  • Guillaume, that helps a lot, thank you.  I am not sure why my recording of the process did not return anything.

    One more thing you might be able to help me with?

    I want to attach that line of code to a commandbutton that toggles between True and False

    I normally use something like

    OptionsViewEx ProjectSummary:= not OptionsViewEx ProjectSummary

    but once again I am having trouble with the syntax. I don't seem to be able to read the property,

    bbut at least now I can set it.

    Worst case is I have two buttons, which is not the end of the world.

    Thanks again for your help,

    Ken

    Tuesday, June 25, 2019 4:09 PM
  • Ken,

    Please allow me to jump in on this one.

    Try this syntax

    ActiveProject.DisplayProjectSummaryTask = Not (ActiveProject.DisplayProjectSummaryTask)

    Hope this helps.

    John

    Tuesday, June 25, 2019 8:06 PM
  • Ken, just a comment.

    You might be trying to recreate something already existing.

    The FORMAT tab since Project 2010 already proposes a checkbox for displaying or not the project summary task. 

    It can also be added to a custom button using the "customize ribbon" option.

    https://tensix.com/2014/07/microsoft-project-2010-project-summary-task/


    Hope this helps,


    Guillaume Rouyre, MBA, MVP, P-Seller

    Tuesday, June 25, 2019 8:39 PM
    Moderator
  • Guillaume and John

    Thank you both very much.  It is going on a custom userform which is way better for my old eyes than the little button way to the right on the Format tab; but that button is way better then my previous round-about way of File_Options_Advanced, then scroll down until I find it. I imagine that explains why nothing recorded for me as it does record when I use the button on the Format tab.  Anyway, now it toggles the way I wanted it to, and I am a bit wiser tonight.

    Thanks to all

    Ken

    PS I usually work in Excel and I regularly ask and answer questions on several Excel forums.  I am always amazed at how much help people are willing to provide.  This my first adventure to a MS Project forum and I am pleased and impressed with it.  Thanks again.

    Wednesday, June 26, 2019 1:01 AM
  • Ken,

    You're welcome and thanks for the feedback.

    John

    Wednesday, June 26, 2019 1:39 AM