Protect and UnProtect

Local time
Today, 22:36
Joined
Jul 4, 2016
Messages
2
I need to import a foreign module dinamically. My Access database is password protected. I have successfully written the import code but i don't know how to unprotect and protect (at the end) my vba code at runtime.
I did at excel using protect and unprotect related to workbooks but i have not found anything like that at access vba level so i don't know if it's actually possible
Please, any suggestion?
 
As far as i know, even in MS Access 2016, there are no commands to lock/unlock the VBA project. You may be able to fudge something with sendkeys, but that is fraught with so many problems/liabilities.

Do you really need the project locked?
 
Thank u so much. That's what i though. I am going to reconsider another security option
 
if you mean set a password for vba code, you can do that in the vba window - Tools>Properties>Protection. I don't know if this can be done dynamically however (i.e. vba code to unlock its own password)

alternatively, create a .accde file
 

Users who are viewing this thread

Back
Top Bottom