Report.Apply method (Project)

Changes the view to display the report.

Syntax

expression.Apply

expression A variable that represents a 'Report' object.

Return value

Nothing

Example

The following example determines whether a report named Report 1 exists, and if so, displays the report.

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

See also

Report Object

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.