다음을 통해 공유


Workbook.PasswordEncryptionAlgorithm Property (Excel)

Returns a String indicating the algorithm Microsoft Excel uses to encrypt passwords for the specified workbook. Read-only.

Syntax

.PasswordEncryptionAlgorithm

A variable that represents a Workbook object.

Remarks

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

Example

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

참고 항목

개념

Workbook Object

Workbook Object Members