excel vba password protect code code example
Example: excel vba password protect
' Password for opening
ThisWorkbook.SaveAs Password:="my_password"
' Access granted, password required for modification
ThisWorkbook.SaveAs writeResPassword:="my_password2"