Setting Passwords and Read-Only Recommendation for a Workbook
Sub pass() ActiveWorkbook.Password = "pass" End Sub