rbritton18
IS-IT--Management
Below is macro. We just changed the password and it keeps giving us an error.
Sub SupervisorLock()
'
' SupervisorLock Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
' This routine unprotects the sheet, locks the employee cells,
' then protects the entire sheet
' Unprotect the sheet
'Call UnprotectSheet
ActiveSheet.Unprotect Password:="clock" - error is here on this line
' select the employee cells, signature area
Range("A1:R32").Select
Range("R32").Activate
' lock the range of selected cells
Selection.Locked = True
Selection.FormulaHidden = False
'protect the sheet from editing
'Call ProtectSheet
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub ProtectSheet()
'
' ProtectSheet Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
'
'
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub UnprotectSheet()
'
' UnprotectSheet Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
'
'
ActiveSheet.Unprotect Password:="clock"
End Sub
Sub SupervisorUnlock()
'this unlocks the employee entry cells and the signature area
'unprotect the sheet
ActiveSheet.Unprotect Password:="clock"
'select range of cells to unlock, employee and signature cells
Range("P8:Q22,F8:J22,L8:N22,Q28,Q32,R8:R22").Select
Range("Q28,Q32").Activate
' unlock the range of selected cells
Selection.Locked = False
Selection.FormulaHidden = False
'protect the sheet
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub SupervisorLock()
'
' SupervisorLock Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
' This routine unprotects the sheet, locks the employee cells,
' then protects the entire sheet
' Unprotect the sheet
'Call UnprotectSheet
ActiveSheet.Unprotect Password:="clock" - error is here on this line
' select the employee cells, signature area
Range("A1:R32").Select
Range("R32").Activate
' lock the range of selected cells
Selection.Locked = True
Selection.FormulaHidden = False
'protect the sheet from editing
'Call ProtectSheet
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub ProtectSheet()
'
' ProtectSheet Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
'
'
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub UnprotectSheet()
'
' UnprotectSheet Macro
' Macro recorded 14/05/2002 by Marty Hrbolich
'
'
ActiveSheet.Unprotect Password:="clock"
End Sub
Sub SupervisorUnlock()
'this unlocks the employee entry cells and the signature area
'unprotect the sheet
ActiveSheet.Unprotect Password:="clock"
'select range of cells to unlock, employee and signature cells
Range("P8:Q22,F8:J22,L8:N22,Q28,Q32,R8:R22").Select
Range("Q28,Q32").Activate
' unlock the range of selected cells
Selection.Locked = False
Selection.FormulaHidden = False
'protect the sheet
ActiveSheet.Protect Password:="clock", DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub