Private Sub CommandButton1_Click()
If TextBox1.Text = "Dein Passwort" Then
Unload Me
Else
Label1.Visible = True
TextBox1.Set Focus
TextBox1.SelStart = 0
TextBox1.SelLength = Len(TextBox1.Test)
End If
End Sub
Private Sub UserForm_Initialize()
Dim frm As UserForm
Set frm = Password
frm.TextBox1.PasswordChar = "*"
frm.TextBox1.SetFocus
frm.Label1.Visible = False
End Sub