Returns or sets a value that determines whether an application starts as a stand-alone project or as an ActiveX component. Read-only at run time.
Syntax
object.StartMode
The object placeholder represents an object expression that evaluates to an object in the Applies To list.
Settings
The StartMode property settings are:
Constant | Value | Description |
vbSModeStandalone | 0 | (Default) Application starts as a stand-alone project. |
VbSModeAutomation | 1 | Application starts as an ActiveX component. |
Remarks
These constants are listed in the Visual Basic (VB) object library in the Object Browser.
At design time, you can set StartMode in the Project Options dialog box to 1 (vbSModeAutomation) to debug an application as if it were started as an ActiveX component.
Once a project is compiled, the value of the StartMode property is determined by how that application is started, not by its nominal setting in the Project Options dialog box.
When StartMode is set to 1 and there are no public classes in the project, you must use the End statement or choose End from the Run menu or toolbar to end the application. If you choose Close from the System menu, the form closes but the project is still running.