Application.DefaultFilePath Property (Excel)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns or sets the default path that Microsoft Excel uses when it opens files. Read/write String.

expression .DefaultFilePath

expression A variable that represents an Application object.

This example displays the current default file path.

MsgBox "The current default file path is " & _ 
 Application.DefaultFilePath
Show: