This documentation is archived and is not being maintained.

VerticalExtentMax Property

Office 2003

You use the VerticalExtentMax property to specify or determine the maximum extent of the vertical view of the ChScrollView object. Returns a Long. Read/write Long.

expression .VerticalExtentMax

expression    Required. An expression that returns a ChScrollView object.

Remarks

You use methods and properties of the ChScrollView object to retrieve information about and control the view of a chart. The portion of the Chart component that displays the chart itself is the visible plot area and it can display the entire chart or a portion of the chart. When only a portion of the chart is displayed in the visible plot area, the effect is as if you have zoomed in on that portion of the chart and the remainder of the chart is contained within a virtual plot area that extends beyond the boundary of the visible plot area. The VerticalExtentMax property represents the total height of a chart whether that chart is zoomed or not. For information on how the values of the properties of the ChScrollView object relate to each other, see the ChScrollView object topic.

Example

The following example uses the VerticalExtentMax property to toggle a chart view between a zoomed and unzoomed:

    Sub ToggleZoom()
     If objChart.ChScrollView.VerticalExtent = objChart.ChScrollView.VerticalExtentMax Then
          ' Zoom chart.
          objChart.ChScrollView.VerticalExtent = (objChart.ChScrollView.VerticalExtentMax / 2)
          objChart.ChScrollView.HorizontalExtent = (objChart.ChScrollView.HorizontalExtentMax / 2)
     Else
          ' Unzoom chart.
          objChart.ChScrollView.VerticalExtent = objChart.ChScrollView.VerticalExtentMax
          objChart.ChScrollView.HorizontalExtent = objChart.ChScrollView.HorizontalExtentMax
     End If
End Sub
  


Applies to | ChScrollView Object


Show: