0% found this document useful (0 votes)
38 views

Check Box

This code uses checkboxes to control the visibility of labels. When Checkbox 1 is checked, Label1 becomes visible, and when unchecked Label1 becomes invisible. The same logic applies to Checkboxes 2 through 4 controlling Labels 2 through 4. A click event for a command button runs through an If/Then statement for each checkbox to set the corresponding label's visibility.

Uploaded by

Saddam Ranjhani
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Check Box

This code uses checkboxes to control the visibility of labels. When Checkbox 1 is checked, Label1 becomes visible, and when unchecked Label1 becomes invisible. The same logic applies to Checkboxes 2 through 4 controlling Labels 2 through 4. A click event for a command button runs through an If/Then statement for each checkbox to set the corresponding label's visibility.

Uploaded by

Saddam Ranjhani
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CODE:

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

You might also like