Application.PanZoomZoomTo method (Project)

Zooms the time range in or out for the Gantt chart in the active view.

Syntax

expression. PanZoomZoomTo( _Start_, _Finish_ )

expression An expression that returns an Application object.

Parameters

Name Required/Optional Data type Description
Start Required Variant Specifies the start date for the left side of the Gantt chart.
Finish Required Variant Specifies the finish date for the right side of the Gantt chart.

Return value

Nothing

Remarks

The PanZoomZoomTo method has no effect on the Calendar view or the Network Diagram (PERT chart) view.

To pan the Gantt chart to a different starting date and maintain the same timescale, use the PanZoomPanTo method. To change the timescale format and labels, use the TimescaleEdit method.

Example

The following command zooms in the Gantt chart to show the time between 10 AM and 5 PM on March 19, 2012.

PanZoomZoomTo Start:="3/19/2012 10:00:00 AM", Finish:="3/19/2012 5:00:00 PM"

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.