unlocking access project using VBA RRS feed

  • Question

  • hi,

    we have an access project locked.

    We need to import or duplicate some object (like reports or forms)

    as the project is locked, it seems to be unpossible to duplicate a report or import forms (vba code doesn't run)

    i would like to unprotect the project using vba (with the code we use) and then import or duplicate and protect again.

    do somebody know how we could unlock the access project with vba ? or import an object using the proctection code ?



    Wednesday, October 5, 2016 9:30 AM


All replies

  • Hi philippe,

    What exactly do you mean by "locked?" How exactly is the project protected? If you're talking about a compiled ACCDE file, then you'll have to find the original ACCDB file to import objects out of it.

    Just my 2 cents...

    • Proposed as answer by David_JunFeng Friday, October 14, 2016 9:38 AM
    • Marked as answer by David_JunFeng Monday, October 17, 2016 2:36 PM
    Wednesday, October 5, 2016 1:17 PM
  • Hi watrelos,

    According to your description,  have you  password protected your VBA project for an Access database like below:

    1.In Access, press ALT+F11 to open the VBA editor.
    2.On the Tools menu, select <Database Name> Properties…
    3.On the Protection tab, select the Lock project for viewing check box.
    4.Enter and confirm a password.
    5.Click OK, and then close and reopen the database.

    If so, it is impossible to use VBA to unprotect the project.

    In addition if you have any feedback for Access, please feel free to submit them to User Voice:


    Thanks for your understanding
    Thursday, October 6, 2016 1:54 AM
  • As theDBguy stated, if you're dealing with mde/accde files, then you need to go back to the source mdb/accdb files.  If on the otherhand you are working with mdb/accdb files, Google is once again your best friend and a simple search returns several functions to do this, such as:



    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, October 6, 2016 8:28 AM