Application.ZoomCalendar method (Project)

Zooms in on or out from the Calendar.

Syntax

expression. ZoomCalendar( _NumWeeks_, _StartDate_, _EndDate_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
NumWeeks Optional Long The number of weeks to display. If StartDate and EndDate are specified, NumWeeks is ignored.
StartDate Optional Variant The first date to display.
EndDate Optional Variant The last date to display.

Return value

Boolean

Remarks

Using the ZoomCalendar method without specifying any arguments displays the Zoom dialog box.

Example

The following example displays four rows of weeks within the active pane of the Calendar view.

Sub FourWeekCalendar() 
 ViewApply Name:="Calendar" 
 ZoomCalendar NumWeeks:=4 
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.