Path Property

Microsoft Excel Visual Basic

Show All

Path Property

       

Path property as it applies to the AutoRecover object.

Sets or returns the complete path to where Microsoft Excel will store the AutoRecover temporary files. Read/write String.

expression.Path

expression   Required. An expression that returns an AutoRecover object.

Path property as it applies to the AddIn, Application, RecentFile, and Workbook objects.

Returns the complete path to the application, excluding the final separator and name of the application. Read-only String.

expression.Path

expression   Required. An expression that returns one of the above objects.

Example

As it applies to the AutoRecover object.

This example sets the path of the AutoRecover file to drive C.

Sub SetPath()

    Application.AutoRecover.Path = "C:\"

End Sub

As it applies to the AddIn, Application, RecentFile, and Workbook objects.

This example displays the complete path to Microsoft Excel.

Sub TotalPath()

    MsgBox "The path is " & Application.Path

End Sub