I have been using code like the below in the Workbook_Open event in multiple workbooks without problem, until today
Private Sub Workbook_Open() Dim wsSheet As Worksheet For Each wsSheet In Worksheets wsSheet.Protect UserInterfaceOnly:=True Next wsSheet End Sub
Today, I’m getting an runtime error 1004 with the usual message of “the cell or chart you’re trying to change is on a protected sheet” etc
I’m certain the Workbook_Open event has run as I temporarily put a msgbox command within it just to check on opening the workbook.
There are no other instances of the word ‘protect’ in any of the code other than the Workbook_Open event.
Any ideas what I can check / change please?