NewProject Event
Occurs when a new project is created, including the default project created each time Microsoft Office Project 2003 starts, and is analogous to the Open event for existing projects. The NewProject event occurs before the new project's Activate event.
Syntax
Private Sub object**_NewProject(ByVal** pj As MSProject.Project)
object An object of type Application declared with events in a class module. For more information, see Using events with the Application object.
pj The project that was created.
Remarks
Project events do not occur when the project is embedded in another document or application.
Example
The following example sets the number of working hours per day for every new project created. (This example requires a new class module and additional code for it to have an effect. For more information, see Using events with the Application object.)
Private Sub App_NewProject(ByVal pj As MSProject.Project)
pj.HoursPerDay = 10
End Sub
Applies to | Application Object
See Also | Activate Method | Deactivate Event | Open Event