Check Box
Check Box
Private Sub Command1_Click() If Check1.Value = 1 Then Label1.Visible = True Else Label1i.Visible = False End If If Check2.Value = 1 Then Label2.Visible = True Else Label2.Visible = False End If If Check3.Value = 1 Then Label3.Visible = True Else Label3.Visible = False End If If Check4.Value = 1 Then Label4.Visible = True Else Label4.Visible = False End If End Sub
Create a Program Using 2 Option Buttons and a Command Button. Let the User Select whether the Command Button Should be Enabled or not.
Design Mode
Run Mode
CODE:
Private Sub Option1_Click() Command1.Enabled = True End Sub Private Sub Option2_Click() Command1.Enabled = False End Sub Private Sub Command1_Click() MsgBox "CLICK IS Enabled" End Sub