Protect(Object, Object, Object) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Protects a workbook so that it cannot be modified.
public void Protect (object Password, object Structure, object Windows);
Public Sub Protect (Optional Password As Object, Optional Structure As Object, Optional Windows As Object)
Optional Object. A string that specifies a case-sensitive password for the worksheet or workbook. If this argument is omitted, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook. If you forget the password, you cannot unprotect the worksheet or workbook. It's a good idea to keep a list of your passwords and their corresponding document names in a safe place.
Optional Object. True to protect the structure of the workbook (the relative position of the sheets). The default value is False.
Optional Object. True to protect the workbook windows. If this argument is omitted, the windows aren’t protected.