Workbook.PasswordEncryptionAlgorithm 屬性 (Excel)
會傳回 String ,指出 Microsoft Excel 用來加密指定活頁簿密碼的演算法。 唯讀。
語法
運算式。PasswordEncryptionAlgorithm
表達 代表 Workbook 物件的 變數。
註解
使用 SetPasswordEncryptionOptions 方法來指定 Excel 是否加密受密碼保護活頁簿的檔案屬性。
範例
這個範例設定使用中活頁簿的密碼加密選項。
Sub SetPasswordOptions()
ActiveWorkbook.SetPasswordEncryptionOptions _
PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
PasswordEncryptionAlgorithm:="RC4", _
PasswordEncryptionKeyLength:=56, _
PasswordEncryptionFileProperties:=True
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。