Application.MakeLocalCalendarEnterprise method (Project)

Converts a local calendar to an enterprise calendar.

Syntax

expression. MakeLocalCalendarEnterprise( _OldName_, _NewName_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
OldName Optional String Name of the local calendar.
NewName Optional String Name of the Enterprise calendar.

Return value

Boolean

Remarks

The NewName parameter is not used. For example, if a local calendar is named "TestCal" and you execute the code MakeLocalCalendarEnterprise OldName:="TestCal", NewName:="New TestCal" , the result is an enterprise calendar named "TestCal".

To create a local calendar when Project Professional is logged on to Project Server, you must check Allow projects to use local base calendars on the Additional Server Settings page in Project Web Access. Restart Project Professional after changing the setting in Project Web Access.

Example

The following example creates a local calendar named TestCal, and then saves it as an enterprise calendar with the same name. If Project Professional is not logged on Project Server, MakeLocalCalendarEnterprise results in a run-time error 1100.

Sub TestCalendar() 
 BaseCalendarCreate Name:="TestCal" 
 MakeLocalCalendarEnterprise OldName:="TestCal" 
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.