Code Examples

Encrypt/Decrypt File

acCmdEncryptDecryptDatabase

This example opens the Encrypt/Decrypt file selection dialog box.

'***************** Code Start *******************
Code by Terry Wickenden

Sub CryptFile()
  On Error GoTo errCryptFile
  RunCommand acCmdEncryptDecryptDatabase
  Exit Sub

errCryptFile:
  Select Case Err
    Case 2501
      'Cancel Button selected in the encrypt database dialog
    Case Else
      MsgBox Err.Number & ":- " & vbCrLf & Err.Description
  End Select

End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.