Application.AppExecute method (Project)

Starts an application.

Syntax

expression. AppExecute( _Window_, _Command_, _Minimize_, _Activate_ )

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Window Optional String The caption of the application to activate.
Command Optional String The command to start the application. Required if Window is omitted. If the application is running, Command is ignored.
Minimize Optional Boolean True if the main window is minimized. The default value is False.
Activate Optional Boolean True if the application is activated. The default value is True.

Return value

Boolean

Example

The following example starts and activates Microsoft Excel.

Sub StartMicrosoftExcel() 
 AppExecute Command:="Excel.exe" 
End Sub

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.