Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I currently have a macro that locks the worksheet once it is passed a month
end date so that no more data can be entered on that worksheet The worksheet locks fine, however the user is still able to use the unprotect feature, despite the password been entered when I ran the macro Private Sub Worksheet_Activate() ' LockSheet After a Specified Date Dim CheckDate As Date Dim CurrentDate As Date CheckDate = Range("IU1").Value CurrentDate = Range("IV1").Value If CurrentDate CheckDate Then ActiveSheet.Protect Password:=Range("IV2") ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ActiveSheet.EnableSelection = xlNoSelection Else ActiveSheet.Unprotect Password:=Range("IV2") End If End Sub Any advise would be appreciated TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way that I can password protect a worksheet | Excel Worksheet Functions | |||
Password Protect a Worksheet | Excel Discussion (Misc queries) | |||
Protect a worksheet with a password | Excel Worksheet Functions | |||
Password protect a worksheet | Excel Programming | |||
Password Protect Worksheet | Excel Programming |