none
Microsoft Project - Generating Macro or VB script for highlighting completed tasks RRS feed

  • Question

  • Microsoft Project Professional 2013

    Hello,

    I frequently use the same procedure to color up and distinguish completed tasks. Currently I do this manually, but frequently.

    See attached image

    Is there a way to generate a macro to do this or write a VB script for it?

    Thanks

    FKMS Project completed tasks highlighted


    Hardcore Scheduling Inc

    Thursday, January 8, 2015 2:39 PM

Answers

  • HarCore Scheduler --

    Why would you want to write VBA code to do this when you could use a Highlight filter to accomplish this for you?  Click the View tab to display the View ribbon.  In the Data section of the View ribbon, click the Highlight pick list and select the Complete Tasks filter.  This will highlight every completed task in yellow automatically.  Before you do this, however, you should remove the cell background coloring you applied manually to completed tasks.  Then, from that point forward, whenever you want to highlight the completed tasks, display the Completed Tasks filter as a Highlight filter.


    Dale A. Howard [MVP]

    Thursday, January 8, 2015 5:43 PM
    Moderator

All replies

  • HardCore,

    Your best approach is to record a macro of you going through your procedure. Then you can review and edit that recording code as necessary.

    Try that and if you have further questions, post the code you have recorded and we'll help you tweak it as necessary.

    But now that read your item a little more closely, you don't need VBA at all. If all you want to do is to highlight tasks that are 100% complete, just create a highlight filter that filters on flag1. Then set up the following custom field formula:

    Flag1=IIf([% Complete]=100,True,False)

    John


    • Edited by John - Project Thursday, January 8, 2015 3:58 PM better idea
    Thursday, January 8, 2015 3:33 PM
  • HarCore Scheduler --

    Why would you want to write VBA code to do this when you could use a Highlight filter to accomplish this for you?  Click the View tab to display the View ribbon.  In the Data section of the View ribbon, click the Highlight pick list and select the Complete Tasks filter.  This will highlight every completed task in yellow automatically.  Before you do this, however, you should remove the cell background coloring you applied manually to completed tasks.  Then, from that point forward, whenever you want to highlight the completed tasks, display the Completed Tasks filter as a Highlight filter.


    Dale A. Howard [MVP]

    Thursday, January 8, 2015 5:43 PM
    Moderator
  • Thanks John. Your solution flags all complete items as YES. I still have to highlight them manually, though.

    Dale's solution addresses my requirement fully.

    Thanks for your help.

     

    Hardcore Scheduling Inc

    Thursday, January 8, 2015 8:44 PM
  • Hi Dale, 

    Thanks for your answer. Yes, it does just what I wanted it to do, quite elegantly.

    Many thanks

    Hardcore Scheduler



    Hardcore Scheduling Inc

    Thursday, January 8, 2015 8:46 PM