title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Workbook.PasswordEncryptionAlgorithm property (Excel) |
vbaxl10.chm199212 |
|
|
2745a8da-2a61-b949-115a-7f1112a0289e |
05/29/2019 |
medium |
Returns a String indicating the algorithm that Microsoft Excel uses to encrypt passwords for the specified workbook. Read-only.
expression.PasswordEncryptionAlgorithm
expression A variable that represents a Workbook object.
Use the SetPasswordEncryptionOptions method to specify whether Excel encrypts file properties for password-protected workbooks.
This example sets the password encryption options for the active workbook.
Sub SetPasswordOptions()
ActiveWorkbook.SetPasswordEncryptionOptions _
PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
PasswordEncryptionAlgorithm:="RC4", _
PasswordEncryptionKeyLength:=56, _
PasswordEncryptionFileProperties:=True
End Sub
[!includeSupport and feedback]