Part | Description | |
object | Required. A valid object. | |
Boolean | Optional. Whether the object can respond to user-generated events. |
Value | Description | |
True | The control can receive the focus and respond to user-generated events, and is accessible through code (default). | |
False | The user cannot interact with the control by using the mouse, keystrokes, accelerators, or hot keys. The control is generally still accessible through code. |
Private Sub CheckBox1_Change()
TextBox2.Text = "TextBox2"
TextBox1.Enabled = CheckBox1.Value
End Sub
Private Sub CheckBox2_Change()
TextBox2.Text = "TextBox2"
TextBox1.Locked = CheckBox2.Value
End Sub
Private Sub UserForm_Initialize()
TextBox1.Text = "TextBox1"
TextBox1.Enabled = True
TextBox1.Locked = False
CheckBox1.Caption = "Enabled"
CheckBox1.Value = True
CheckBox2.Caption = "Locked"
CheckBox2.Value = False
TextBox2.Text = "TextBox2"
End Sub