Microsoft KB Archive/31947

{| = Excel 1.00-1.50: Protect Document with Password Through Macro =
 * width="100%"|

Last reviewed: October 31, 1994

Article ID: Q31947

SUMMARY
In Microsoft Excel versions 1.50 and earlier, there is no direct method to protect or unprotect a document with a password. To protect a document with a password, use the PROTECT.DOCUMENT? macro command.

The PROTECT.DOCUMENT? macro command will bring up the Protect Document dialog box. Type in the password in the dialog box and click OK.

MORE INFORMATION
In Excel version 2.20, the PROTECT.DOCUMENT? macro command has a new parameter for a password so that a document can be protected with a password directly from the macro.
 * }