Application.OpenBrowser method (Project)

Opens the default web browser to a specified URL or the Windows Explorer to a specified directory or project file.

Syntax

expression. OpenBrowser (URL)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
URL Optional String The URL to use for the browser address.

Return value

Boolean

True if the web browser or the Windows Explorer opens; otherwise, False.

Remarks

Use the OpenBrowser method to open the browser to a specified URL. If the URL parameter is not specified, the OpenBrowser method opens the Windows Explorer to the My Documents folder on the local computer.

If you specify an .MPP file path, Project opens the file.

Examples

The following examples are valid, if the specified URL location exists:

  • Application.OpenBrowser()

  • Application.OpenBrowser("https://MySharePointSite")

  • Application.OpenBrowser("https://MySharePointSite/_layouts/15/start.aspx#/Lists/Test%20tasks%20list%201/")

  • Application.OpenBrowser("file:///C:/Project")

  • Application.OpenBrowser("file://localhost/C|/Project")

  • Application.OpenBrowser("file:///C|/Project/Samples/Project1.mpp")

See also

Application Object

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.