Table of contents
Collapse the table of content
Expand the table of content

Project.Activate Event (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Occurs when switching to the project from another project, including when the project is opened or created.


expression. Activate( ** pj** )

expression A variable that represents a Project object.


NameRequired/OptionalData TypeDescription
pjRequiredProjectThe project that was activated.


When you switch between two windows showing the same project, the Activate event for the project doesn't occur.

This event doesn't occur when you create a new window.

Project events do not occur when the project is embedded in another document or application.


The following example ensures that the project window is maximized whenever it is activated.

Private Sub Project_Activate(ByVal pj As MSProject.Project) 
    pj.Windows.ActiveWindow.WindowState = pjMaximized 
End Sub
© 2017 Microsoft