
Originally Posted by
jds217
One other thing I've discovered ... when I first open the file, anytime I try to change an employee, I get an error message:
Unable to set the ColorIndex property of the Font class.
However, once I run the macro to clear the calendar, then I don't get that error message anymore.
the userinterfaceonly property can not be stored when the workbook closes. It has to be set EVERY time you open the workbook.
You need to run this when the workbook opens
Private Sub Workbook_Open()
dim sh as worksheet
for each sh in thisworkbook.worksheets
sh.protect userinterface:=true
next sh
End Sub
Then in emptyUnlocked you can replace
For Each sh In ThisWorkbook.Worksheets
sh.Protect userinterfaceonly:=True
Next sh
with
ActiveSheet.Protect userinterfaceonly:=True
Bookmarks