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
    Hello Rick,

    Very nice, but how could I enter the "Me.CheckBox1.Caption =" Password invisible " and " Me.CheckBox1.Caption = "Show Password",when check box is checked or not.
    And if you can tell me: by pressing the OK button to write me in cell A2 password and B2 date, and then in A3 and B3 and so on.
    Show me the code you have now (as integrated with the code that Admin posted for you)... that way I don't have to try and guess what you have done or what you actually need.

  2. #2
    Member
    Join Date
    Jul 2012
    Posts
    55
    Rep Power
    14
    Quote Originally Posted by Rick Rothstein View Post
    Show me the code you have now (as integrated with the code that Admin posted for you)... that way I don't have to try and guess what you have done or what you actually need.
    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
    Except line in red I get from Admin.
    Thank you.

  3. #3
    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

  4. #4
    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
  •