hi all.
this should be so simple.. yet it doesn't work for me hehe
for some reason.. when it protects it doesn't use the p[assword...
this should be so simple.. yet it doesn't work for me hehe
Code:
Sub LockLogs()
Dim pword As String
pword = mypassword
If ActiveSheet.Protect = False Then
ActiveSheet.Protect Password:=pword
Else
ActiveSheet.Unprotect Password:=pword
End If
End Sub
for some reason.. when it protects it doesn't use the p[assword...