Reports.IsPresent method (Project)
Indicates whether the specified custom report exists in the project.
Syntax
expression. IsPresent
(Name)
expression A variable that represents a 'Reports' object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Required | String | Description |
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
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.