Application.GlobalBaseCalendars property (Project)

Gets or sets a Calendars collection representing the base calendars of the Global.mpt file. Read/write Calendars.

Syntax

expression. GlobalBaseCalendars

expression A variable that represents an Application object.

Remarks

To add a calendar to the enterprise global template, first create a local calendar, and then add the local calendar to the enterprise global template with the MakeLocalCalendarEnterprise method.

To enable creating local base calendars in an enterprise project, check Allow projects to use local base calendars on the Additional Server Settings page in Project Web App.

Example

The following example creates a local base calendar and then imports the calendar to the enterprise global template.

Note

The GlobalBaseCalendars property is the collection of calendars in the local Global.mpt file, not in the enterprise global template.

Sub CreateEGlobalCalendar() 
    Dim globalCalendar As Calendar 
 
    BaseCalendarCreate Name:="NewBaseCalendar" 
    MakeLocalCalendarEnterprise OldName:="NewBaseCalendar", NewName:="NewBaseCalendar" 
 
    Debug.Print "Number of calendars in Global.mpt: " & GlobalBaseCalendars.Count 
 
    For Each globalCalendar In GlobalBaseCalendars 
        Debug.Print globalCalendar.Name 
    Next globalCalendar 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.