Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 3.09 KB

Project.Application.OptionsCalendar.md

File metadata and controls

66 lines (47 loc) · 3.09 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.OptionsCalendar method (Project)
vbapj.chm649
vbapj.chm649
project-server
Project.Application.OptionsCalendar
bde3b645-3417-ee45-57b5-0109bc7b17ad
06/08/2017
medium

Application.OptionsCalendar method (Project)

Sets options for the calendar of the active project.

Syntax

expression. OptionsCalendar( _StartWeekOnMonday_, _StartYearIn_, _StartTime_, _FinishTime_, _HoursPerDay_, _HoursPerWeek_, _SetDefaults_, _StartWeekOn_, _UseFYStartYear_, _DaysPerMonth_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
StartWeekOnMonday Optional Boolean True if the calendar week starts on Monday. False if the calendar week starts on Sunday. If StartWeekOn is specified, StartWeekOnMonday is ignored. (The StartWeekOn argument is a better way to specify the start of the week.)
StartYearIn Optional Long The first month of the fiscal year. Can be one of the PjMonth constants.
StartTime Optional Variant The default start time for working days.
FinishTime Optional Variant The default finish time for working days.
HoursPerDay Optional Double The default number of work hours per day.
HoursPerWeek Optional Double The default number of work hours per week.
SetDefaults Optional Boolean True if the values of StartYearIn, StartTime, FinishTime, HoursPerDay, HoursPerWeek, StartWeekOn, and UseFYStartYear are used as the default values for new projects. The default value is False.
StartWeekOn Optional Long The first day of the week. Can be one of the PjWeekday constants.
UseFYStartYear Optional Boolean True if a fiscal year is determined by the year of the first month of that fiscal year. False if determined by the last month of the fiscal year.For example, if StartYearIn is pjJuly (to denote July 2012) and UseFYStartYear is True, the fiscal year ending in June 2012 would be FY2012.
DaysPerMonth Optional Double The default number of work days per month.

Return value

Boolean

Remarks

If an argument is omitted, the default value is specified by the setting on the Schedule tab of the Project Options dialog box.

Using the OptionsCalendar method without specifying any arguments displays the Project Options dialog box with the General tab selected.

Example

The following example sets the first month of the fiscal year to April, default number of work hours per day to 4 hours and default number of work hours per week to 20 hours.

Sub Options_Calendar() 
    Dim HoursDay As Double 
    Dim HoursWeek As Double 
 
    HoursDay = 4 
    HoursWeek = 20 
 
    OptionsCalendar StartYearIn:=pjApril, HoursPerDay:=HoursDay, HoursPerWeek:=HoursWeek 
End Sub

[!includeSupport and feedback]