Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 1.93 KB

Project.application.zoomreport.md

File metadata and controls

66 lines (43 loc) · 1.93 KB
title keywords f1_keywords ms.service ms.assetid ms.date ms.localizationpriority
Application.ZoomReport method (Project)
vbapj.chm2196
vbapj.chm2196
project-server
05a0ec6e-1329-2545-df89-5d87af88a454
06/08/2017
medium

Application.ZoomReport method (Project)

Zooms (enlarges or shrinks) the active report to the specified percentage of its original size.

Syntax

expression. ZoomReport (Percent, Entire)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Percent Optional Variant The percent of the original size.
Entire Optional Variant The Entire parameter has no effect.
Percent Optional Variant
Entire Optional Variant
Name Required/Optional Data type Description

Return value

Boolean

Remarks

The Percent parameter can have a value of 10 to 400. If the value is outside of that range, the ZoomReport method shows a run-time error 1101, "The argument value is not valid."

The ZoomReport method can be applied to custom reports and to built-in reports, such as Project Overview. When you change the report size, switch to another view, and then return to the previous report, the zoom level remains in effect. To restore the original size, use the following command: ZoomReport 100.

Example

The following example checks whether a report exists; if so, the example displays the report, and then zooms the report to 80% of its original size.

Sub ReportZoom()
    Dim reportName As String
    reportName = "Report 1"
    
    If ActiveProject.Reports.IsPresent(reportName) Then
        ApplyReport reportName
        ZoomReport 80
    Else
        MsgBox Prompt:="No custom report name: " & reportName, Title:="Report apply error"
    End If
End Sub

[!includeSupport and feedback]