Ich komme einfach nicht weiter.
Ich habe sonst mit einer Inputbox ein Passwort abgefragt.
Jedoch möchte ich das Ganze jetzt mittels Userform durchführen, da hier das Passwort in Sternchen angezeigt wird.
Im Code der Userform steht:
Option Explicit
Private Sub CommandButton2_Click()
'Abbrechen
Unload Me
End Sub
Private Sub CommandButton1_Click()
'OK
If TextBox1.Value = "Testpasswort" Then Call pwoopen
If TextBox1.Value = "" Then Unload Me
End If
Unload Me
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = 0 Then TextBox1 = ""
End Sub
Private Sub pwoopen()
Application.ScreenUpdating = False
pw.Visible = True
pw.Select
Application.ScreenUpdating = True
End Sub
Private Sub pwclose()
Application.ScreenUpdating = False
Tabelle1.Visible = xlSheetVeryHidden
Tabelle2.Select
Tabelle2.Cells(1, 2).Value = " "
Application.ScreenUpdating = True
ActiveWorkbook.Save
End Sub
Was mache ich falsch?