Protect and UnProtect (1 Viewer)

Local time
Today, 18:55
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?
 

Isskint

Slowly Developing
Local time
Today, 17:55
Joined
Apr 25, 2012
Messages
1,302
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?
 
Local time
Today, 18:55
Joined
Jul 4, 2016
Messages
2
Thank u so much. That's what i though. I am going to reconsider another security option
 

CJ_London

Super Moderator
Staff member
Local time
Today, 17:55
Joined
Feb 19, 2013
Messages
16,553
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

Top Bottom