Visual Basic Reference
Returns or sets a value that enables the user to activate an object by double-clicking the OLE container control or by moving the focus to the OLE container control.
object.AutoActivate [= value]
The AutoActivate property syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|value||An integer or constant specifying the technique used to activate the object within the OLE container control, as described in Settings.|
The settings for value are:
|vbOLEActivateManual||0||Manual. The object isn't automatically activated. You can activate an object programmatically using the DoVerb method.|
|vbOLEActivateGetFocus||1||Focus. If the OLE container control contains an object that supports single click activation, the application that provides the object is activated when the OLE container control receives the focus.|
|vbOLEActivateDoubleclick||2||(Default) Double-Click. If the OLE container control contains an object, the application that provides the object is activated when the user double-clicks the OLE container control or presses ENTER when the control has the focus.|
|vbOLEActivateAuto||3||Automatic. If the OLE container control contains an object, the application that provides the object is activated based on the object's normal method of activation either when the control receives the focus or when the user double-clicks the control.|
You can determine if the OLE container control contains an object by checking the OLEType property.
Note When AutoActivate is set to 2 (Double-Click), the DblClick event doesn't occur when the user double-clicks an OLE container control.