Results 1 to 10 of 10

Thread: CheckBox to see password

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    15
    Quote Originally Posted by Ingolf View Post
    This is the code:
    Code:
    Private Sub CheckBox1_Click()
        If Me.CheckBox1.Value Then
            Me.CheckBox1.Caption = "Password invizible"
            Me.TextBox1.PasswordChar = "*"
            TextBox1.SetFocus
        Else
            Me.CheckBox1.Caption = "Show password"
            Me.TextBox1.PasswordChar = vbNullString
            TextBox1.SetFocus
        End If
    End Sub
    The following code will function exactly the same as the above posted code...
    Code:
    Private Sub CheckBox1_Click()
      TextBox1.PasswordChar = Left("*", -CheckBox1.Value)
      CheckBox1.Caption = Array("Show password", "Password invisible")(-CheckBox1.Value)
      TextBox1.SetFocus
    End Sub

  2. #2
    Member
    Join Date
    Jul 2012
    Posts
    55
    Rep Power
    14
    Quote Originally Posted by Rick Rothstein View Post
    The following code will function exactly the same as the above posted code...
    Code:
    Private Sub CheckBox1_Click()
      TextBox1.PasswordChar = Left("*", -CheckBox1.Value)
      CheckBox1.Caption = Array("Show password", "Password invisible")(-CheckBox1.Value)
      TextBox1.SetFocus
    End Sub

    Woowwww
    Thank you very much Rick.

Similar Threads

  1. Replies: 5
    Last Post: 04-18-2013, 02:30 AM
  2. Password Holder
    By littleiitin in forum Download Center
    Replies: 3
    Last Post: 01-01-2013, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •