
Originally Posted by
Ingolf
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
Bookmarks