Public Class dashboardpass Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If Dashboard.CheckBox1.Checked = True Then Dim password As String = "lhoyaccess123" If TextBox1.Text = password Then Dashboard.Label1.Visible = True Dashboard.Label2.Visible = True Dashboard.Label3.Visible = True Dashboard.Label4.Visible = True Dashboard.Label5.Visible = True Dashboard.Label6.Visible = True Dashboard.Label7.Visible = True Dashboard.Label8.Visible = True Dashboard.Label9.Visible = True Dashboard.Label10.Visible = True Dashboard.Label11.Visible = True Dashboard.Label12.Visible = True Dashboard.Label13.Visible = True Dashboard.Label14.Visible = True Dashboard.Label15.Visible = True Dashboard.Label16.Visible = True TextBox1.Text = "" Me.Close() Else Dashboard.Label1.Visible = False Dashboard.Label2.Visible = False Dashboard.Label3.Visible = False Dashboard.Label4.Visible = False Dashboard.Label5.Visible = False Dashboard.Label6.Visible = False Dashboard.Label7.Visible = False Dashboard.Label8.Visible = False Dashboard.Label9.Visible = False Dashboard.Label10.Visible = False Dashboard.Label11.Visible = False Dashboard.Label12.Visible = False Dashboard.Label13.Visible = False Dashboard.Label14.Visible = False Dashboard.Label15.Visible = False Dashboard.Label16.Visible = False MsgBox("Password is invalid. Please try again.") End If Else Dashboard.Label1.Visible = False Dashboard.Label2.Visible = False Dashboard.Label3.Visible = False Dashboard.Label4.Visible = False Dashboard.Label5.Visible = False Dashboard.Label6.Visible = False Dashboard.Label7.Visible = False Dashboard.Label8.Visible = False Dashboard.Label9.Visible = False Dashboard.Label10.Visible = False Dashboard.Label11.Visible = False Dashboard.Label12.Visible = False Dashboard.Label13.Visible = False Dashboard.Label14.Visible = False Dashboard.Label15.Visible = False Dashboard.Label16.Visible = False End If End Sub Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Enter Then Button1.PerformClick() Else End If End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged End Sub End Class