When I open a copy of the file on my computer I don't get any error. When I open the attachment I only get the error when I click the 'Enable Editing' button because 'Protected View' is turned on in Excel. If you turn off 'Protected View' on your computer, you shouldn't get the error message but by doing so, you could expose your computer to potentially unsafe files. Open the attachment in my previous post. When you get the error message click 'End'. Save the file on your computer and then close it. Re-open it and see if the error message still appears. If this doesn't work, try starting with your original file and make the changes such as unmerging the cells in column D and unlocking them. Then copy and paste the macro below into the 'ThisWorkbook' code module. Save the file and then re-open it. You may want to 'Save As' and change the file name so you don't overwrite your original file. Please let me know how it works out.
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Dim ws As Worksheet
Dim rng As Range
For Each ws In Sheets
If ws.Name <> "Title Sheet" And ws.Name <> "Usage" Then
ws.Activate
ActiveSheet.unprotect Password:="password"
If Date < Range("R7").Value Then
For Each rng In Range("D1:D189")
rng.Locked = True
Next rng
End If
ActiveSheet.Protect Password:="password"
End If
Next ws
Application.ScreenUpdating = True
End Sub
Bookmarks