Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.32 KB

Project.Project.Open.md

File metadata and controls

58 lines (36 loc) · 1.32 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Project.Open event (Project)
vbapj.chm131191
vbapj.chm131191
project-server
Project.Project.Open
ff66a69b-4190-ddef-ad39-12a3f9f85b9c
06/08/2017
medium

Project.Open event (Project)

Occurs when the project opens, but before the Activate event.

Syntax

expression.Open (pj)

expression A variable that represents a Project object.

Parameters

Name Required/Optional Data type Description
pj Required Project The project that was opened.

Return value

Nothing

Remarks

Project events don't occur when the project is embedded in another document or application.

Example

This example adds the user's email alias and the current date to the project Comments field whenever the project is opened. Placing this example in the Open event of a project provides a simple access history for the file.

Private Sub Project_Open(ByVal pj As MSProject.Project) 
    Dim Alias As String 
 
    Alias = InputBox$("Please enter your email alias: ") 
    pj.ProjectSummaryTask.AppendNotes vbCrLf & "Opened by " & Alias & _
        " on " & Date$ & "." 
End Sub

[!includeSupport and feedback]