Hi Excel Fox

Used the code below but still asks to unprotect sheet otherwise does not work

Code:
Private Sub Auto_Open()

    Dim wks As Worksheet
    
    For Each wks In Worksheets
        With wks
           .Protect Password:="YourPassWordHERE", UserInterfaceOnly:=True
           .EnableOutlining = True
        End With
    Next wks

End Sub