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

Application.VisualReportsSaveDatabase Method (Project)

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

Saves a Visual Reports database to the default directory or to a specified directory.


expression. VisualReportsSaveDatabase( ** strNamePath, ** PjVisualReportsDataLevel )

expression A variable that represents an Application object.


NameRequired/OptionalData TypeDescription
strNamePathOptionalStringName and full path of the location to which to save the database file (.mbd).
PjVisualReportsDataLevelOptionalLongSave data level. Can be one of the PjVisualReportsDataLevel constants. Default is pjLevelAutomatic.

Return Value



The PjVisualReportsDataLevel parameter specifies the level to which the timephased data can be accessed. For example, if pjLevelMonths (months) is specified, it not possible to access pjLevelDays (days).


Following is an example of using The VisualReportsSaveDatabase method.

Sub a() 
 Dim tf As Boolean 
 tf = Application.VisualReportsSaveDatabase("C:\mydb.mdb", pjLevelAutomatic) 
 If tf = True Then 
 MsgBox ("Database saved successfully") 
 MsgBox ("Database wasn't saved successfully") 
 End If 
End Sub
© 2018 Microsoft