Excel VisualBasic Script

Sub protect()
    ActiveWorkbook.Protect Password:="pass", Structure:=True, Windows:=True
End Sub