Hello all. I am trying to share a worbook that contains macros. One sheet in this book, "Stats", is protected upon opening with the code:

Private Sub Workbook_open()
Dim sh As Worksheet
Set sh = Sheets("Stats")
sh.EnableAutoFilter = True
sh.Protect contents:=True, userInterfaceOnly:=True, Password:="rats"
End Sub

This was to allow the macros to run on this protected sheet. The problem is when i set this workbook to Shared, opening it causes the error:

Run-time error '1004': Method 'Protect' of object '_Worksheet' failed

Any ideas on how i can share this successfully?