Table of contents
TOC
Collapse the table of content
Expand the table of content

Reports.IsPresent Method (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Indicates whether the specified custom report exists in the project.

Syntax

expression. IsPresent(Name)

expression A variable that represents a Reports object.

Parameters

NameRequired/OptionalData typeDescription
NameRequiredStringDescription

Return value

Boolean

True if the custom report exists; otherwise, False.

Example

The following example uses the IsPresent method to determine whether a report exists and can be displayed.

Sub ShowAReport()
    Dim reportName As String

    reportName = "Table Tests"

    If ActiveProject.Reports.IsPresent(reportName) Then
        ActiveProject.Reports(reportName).Apply
    Else
        MsgBox Prompt:="No custom report name: " &; reportName, Title:="Report apply error"
    End If
End Sub

See also

Other resources

Reports ObjectReport Object

© 2018 Microsoft