ACE Project Systems

Tools for better Project control, making your life easier

Scrolling the Timescale on project open

This tool solves the annoyance of longer projects of having to scroll the timescale every time you open a project file. What it does:
1. If the project is in the future, scroll to the project’s start date.
2. If the project is in the past, scroll to the project’s finish date
3. Otherwise scroll to today’s date

The Code

The code lives in the Project_Open event and consists of:

Private Sub Project_Open(ByVal pj As Project)
    If Date < pj.ProjectSummaryTask.Start Then
        EditGoTo Date:=pj.ProjectSummaryTask.Start
    ElseIf Date > pj.ProjectSummaryTask.Finish Then
        EditGoTo Date:=pj.ProjectSummaryTask.Finish
    Else
        EditGoTo Date:=Date
    End If
  End Sub

To create the Project_Open event:
1. In Project (any version), press Alt+F11 to open the Visual Basic Editor (VBE).
2. Press Ctrl+R to make sure the Project Explorer is open (pane on left of VBE window).
3. Double-click the ProjectGlobal (Global.Mpt) folder to expand it
4. Double-click the ThisProject (Global.Mpt) file to open it.
5. Copy the above code into this file

As the code is in your Global.Mpt file, it works when you open any project.
To test, open any project and check the date on the timescale to confirm Project has scrolled it as required.