Deactivate Event
Occurs when switching from the current project to another project, including when the project is closed. This event is the last event to occur for a project, including the BeforeClose event.
Syntax
Private Sub Project_Deactivate(ByVal pj As MSProject.Project)
pj The project that was deactivated.
Remarks
When you switch between two windows showing the same project, the Deactivate event for the project doesn't occur.
Project events do not occur when the project is embedded in another document or application.
Applies to | Project Object, Projects Collection Object
See Also | Activate Method | BeforeClose Event