Workbook.PasswordEncryptionKeyLength (Excel)

Returns a Long indicating the key length of the algorithm that Microsoft Excel uses when encrypting passwords for the specified workbook.

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


Dim lngPasswordEncryptionKeyLength As Long
lngPasswordEncryptionKeyLength = ActiveWorkbook.PasswordEncryptionKeyLength