Copy this macro in a normal module
It will run automatic when you open the workbook
You can also use the workbook open event
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="rbelecki", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub
Look in the VBA help for more information about protect(userinterfaceonly)