bin mal wieder am VBA-rumprobieren. Ich hab mir ne UserForm erstellt. Diese besteht aus einem Textfeld und zwei CommandButtons. Soll so etwas wie ne Passwort-Abfrage werden:)
Folgender Code gibtmir ne Fehlermeldung:
Sub cmd1_Click()
Dim passwort As String
passwort = "test"
If Not txt1.Name = passwort Then
Unload Me
Else
Application.Workbooks.Open
End If
End Sub
Sub cmd2_Click()
Unload Me
End Sub
Wer hat ne Idee.
Danke und Gruß
Apollo