Enabled

Returns or sets a value that determines whether a form or control can respond to user-generated events.

Syntax

object.Enabled [= boolean]

The parts of the Enabled property syntax are described in the following table.

Part Description
object An object expression that evaluates to an object. If object is omitted, the form associated with the active form module is assumed to be object.
boolean A Boolean expression that specifies whether object can respond to user-generated events.

Settings

The settings for boolean are described in the following table.

Setting Description
True (Default). Allows object to respond to events.
False Prevents object from responding to events.

Remarks

The Enabled property allows forms and controls to be enabled or disabled at run time. For example, you can disable objects that do not apply to the current state of the application. You can also disable a control used purely for display purposes, such as a text box that provides read-only information.

Disabling a Timer control by setting Enabled to False cancels the countdown set up by the control's Interval property.