Jan 30, 2014

Setting the Project Gantt time scale - overcoming Zoom

One of the things I hate about Project is the Zoom function on the Gantt view. As it is, zooming leaves the scale in weird units on seemingly arbitrary boundaries. Given that, I wish it would zoom on the task table and leave the Gantt time scale alone. Frustrated with this, I wrote the following macro to easily reset the timescale to something sensible: showing 3 tiers with year, quarter, and month in a compact format. You may find this useful directly, or may want to play around with the constants to customize it.

Sub YQM_timescale()
' Changes the Gantt scale to show Year, Quarter, and Month
    TimescaleEdit TierCount:=3, Separator:=True, Enlarge:=80, _
        TopUnits:=pjTimescaleYears, TopLabel:=pjYear_yyyy, TopCount:=1, _
            TopAlign:=pjCenter, _
        MajorUnits:=pjTimescaleQuarters, MajorLabel:=pjQuarter_Qq, MajorCount:=1, _
            MajorUseFY:=True, MajorAlign:=pjCenter, _
        MinorUnits:=pjTimescaleMonths, MinorLabel:=pjMonth_m, MinorCount:=1, _
            MinorUseFY:=True, MinorTicks:=True
End Sub

No comments: