I tried that, only the cell has text in it and it changed the text to 'false' instead? Can I use the name of the tick box 'Approve1_Click()',
This is my code so far:
Private Sub Approve1_Click()
'
' lockout Macro
' Macro recorded 10/01/2005 by simontyler
'
line0:
P1$ = InputBox("Please enter the password 'cen', in below box to lock spreadsheet. or press cancel.")
If P1$ = "cen" Then GoTo line2
If P1$ = "" Then GoTo line1
line1:
MsgBox ("Incorrect password, Please enter a password")
GoTo line0
line2:
ActiveSheet.Protect P1$
Sheets("Extra").Protect P1$
End Sub
Private Sub unlocksheet1_Click()
line6:
P1$ = InputBox("Please enter password 'cen', to unlock")
If P1$ = "cen" Then GoTo line4
If P1$ = "" Then GoTo Line5
Line5:
MsgBox ("incorrect password, please enter a password")
GoTo line6
line4:
ActiveSheet.Unprotect P1$
Sheets("Extra").Unprotect P1$
End Sub