Syntax

expression.PasswordEncryptionAlgorithm

expression A variable that represents a Workbook object.

Remarks

Use the method to specify whether Excel encrypts file properties for password-protected workbooks.

Example

This example sets the password encryption options for the active workbook.

Visual Basic for Applications
Sub SetPasswordOptions() ActiveWorkbook.SetPasswordEncryptionOptions _ PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _ PasswordEncryptionAlgorithm:="RC4", _ PasswordEncryptionKeyLength:=56, _ PasswordEncryptionFileProperties:=True End Sub
password encryption algorithm passwordencryption passwordencryptionalgorithm passwordencryptionalgorithm property

See also: