Results 1 to 4 of 4
  1. #1
    hansdbase is offline Advanced Beginner
    Windows 11 Access 2021
    Join Date
    Nov 2022
    Posts
    33

    Protecting VBA Code

    Are there any near foolproof ways to protect the vba code in access from being accessed and viewed by a user? If I compile the file will users still be able to see the code if there is an error the execution of a subroutine? Thanks.

  2. #2
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    If you compile and save the file as an ACCDE then the code is unreadable and inaccessible, without getting someone to pay to have it reverse engineered.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    hansdbase is offline Advanced Beginner
    Windows 11 Access 2021
    Join Date
    Nov 2022
    Posts
    33
    Minty, Thank you. Is there anything else technically I can do to prevent it from being reverse engineered? And if I compile it as you suggested, will the code still be hidden even if a subroutine results in an error? In other words will a "debug" option present itself to the user? Thank you again.

  4. #4
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,158
    Once it's compiled as a Accde, there is no debug option.
    The database will simply crash out if you haven't got decent error handling coded in.

    As far as reverse engineering it, it's a complicated and expensive process, and most of the firms that provide it as a service require some form of proof of ownership before undertaking the work.
    As with all things if someone is prepared to put a lot of effort / time / expense in you won't beat them, but how desperate are they?
    Your code will be as protected as it can be in an Access environment.

    Obviously, you must make sure you have a normal accdb version backed up and saved for your own development purposes, otherwise you're into paying someone...
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Please reply to this thread with any new information or opinions.

Similar Threads

  1. PW protecting a single form
    By SamL in forum Programming
    Replies: 3
    Last Post: 11-14-2021, 12:22 PM
  2. Protecting a field with password
    By laqa in forum Security
    Replies: 7
    Last Post: 04-10-2018, 02:55 PM
  3. Password protecting a table?
    By Celx in forum Security
    Replies: 2
    Last Post: 12-17-2011, 02:09 AM
  4. How protecting a mdb database ?
    By PaulL in forum Security
    Replies: 1
    Last Post: 01-14-2010, 04:43 PM
  5. Password protecting db
    By lmp101010 in forum Access
    Replies: 1
    Last Post: 12-20-2009, 03:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums