VBA/Excel/Access/Word/Excel/Workbook Encryption — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 16:33, 26 мая 2010

Set Encryption

 
Sub SetEncryption()
    Dim myWorkbook As Workbook, pass As String
    Set myWorkbook = ThisWorkbook
    myWorkbook.SetPasswordEncryptionOptions "Microsoft Strong Cryptographic Provider", "RC4", 128, True
End Sub



Show Encryption Properties

 
Sub ShowEncryptionProperties()
    Dim myWorkbook As Workbook, pass As String
    Set myWorkbook = ThisWorkbook
    Debug.Print myWorkbook.PasswordEncryptionAlgorithm
    Debug.Print myWorkbook.PasswordEncryptionFileProperties
    Debug.Print myWorkbook.PasswordEncryptionKeyLength
    Debug.Print myWorkbook.PasswordEncryptionProvider
End Sub