What is the code to open, using VBA, an mdb of which you know the password that locks its vba project? (you know, the one that's set in the vba project's properties window)
For example, in the code below, how do you open the strPath database, if you know its vba password, when Protection = 1?
Sub ProcessDatabase(ByVal strPath As String)
Dim vbc As VBIDE.VBComponent
app.OpenCurrentDatabase strPath
With app.VBE.ActiveVBProject
If .Protection = 0 Then
For Each vbc In .VBComponents
ProcessModule vbc.CodeModule, strPath
Next vbc
End If
app.CloseCurrentDatabase
End Sub
Giorgio
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (1) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar