Application.ZoomTimescale method (Project)

Zooms in on or out from the Gantt Chart, Resource Graph, Resource Usage, or Task Usage view to show information about tasks or resources in a certain duration.

Syntax

expression. ZoomTimescale( _Duration_, _Entire_, _Selection_, _Reset_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Duration Optional Variant The duration to display in the view.
Entire Optional Boolean True if the view resizes to fit the entire project onto the screen. The default value is False.
Selection Optional Boolean True if the view resizes to fit only the selected tasks onto the screen. The default value is False.
Reset Optional Boolean True if the view is reset to its default size. The default value is False.

Return value

Boolean

Remarks

Except for the Resource Graph, where the entire view is affected, all zooming occurs in the non-entry portion of the active view.

Example

The following example attempts to fit the entire project onto the screen.

Sub Display() 
 ZoomTimescale Entire:=True 
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.