Enabled

This property returns and sets a value that determines whether a form or control can respond to user-generated events.

Syntax

object.Enabled [= Boolean]

Parameters

object
Object expression that evaluates to a control or form. If object is omitted, the form associated with the active form module is assumed to be object.
Boolean
Boolean expression that specifies whether object can respond to user-generated events. Following are the settings for Boolean:
True (default)
Enables 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 also can disable a control used solely 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 by the control's Interval property.