07.08.2023, 22:10
Hallo Leute ich bräuchte mal eurer Hilfe, und hoffe Ihr könnt mir helfen.
Dieser VBA Code funktioniert:
Private Sub CommandButton1_Click()
Dim PW As String
With ActiveSheet
If .Protect Then
PW = Application.InputBox("Bitte Passwort eingeben:", "Passwortabfrage")
If PW = "Falsch" Or PW = "False" Then Exit Sub
If PW <> "Test" Then
MsgBox "Falsches Passwort", vbCritical
Exit Sub
Else
.Unprotect Password:="Test"
End If
Else
.Protect Password:="Test"
End If
End With
End Sub
was nicht mehr funktioniert sind Links innerhalb der Arbeitsmappe
sowie keine Button mehr z.B. "gehe zu A1
Kann mir jemand helfen?
Danke Gruß Phoeni
Dieser VBA Code funktioniert:
Private Sub CommandButton1_Click()
Dim PW As String
With ActiveSheet
If .Protect Then
PW = Application.InputBox("Bitte Passwort eingeben:", "Passwortabfrage")
If PW = "Falsch" Or PW = "False" Then Exit Sub
If PW <> "Test" Then
MsgBox "Falsches Passwort", vbCritical
Exit Sub
Else
.Unprotect Password:="Test"
End If
Else
.Protect Password:="Test"
End If
End With
End Sub
was nicht mehr funktioniert sind Links innerhalb der Arbeitsmappe
sowie keine Button mehr z.B. "gehe zu A1
Kann mir jemand helfen?
Danke Gruß Phoeni