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
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.