Excel VisualBasic Script

Sub WritePassword()
    Dim myWorkbook As Workbook, pass As String
    Set myWorkbook = ThisWorkbook
    myWorkbook.Password = ""
    myWorkbook.WritePassword = "Excel2003"
    If myWorkbook.WriteReserved Then _
      Debug.Print "Reserved by: " & myWorkbook.WriteReservedBy
    Debug.Print myWorkbook.BuiltinDocumentProperties("Last Author")
End Sub