• Thank you, still no can do. Following your latest advice, the code is now

    Sub ProcessDatabase(ByVal strPath As String)

    Dim vbc As VBIDE.VBComponent, objConnection As ADODB.Connection, strConnection As String

    On Error GoTo ExitHere

    Set objConnection = New ADODB.Connection

    strConnection = GetConnectionstring(strPath)

    objConnection.Open strConnection

    ShowSchema

    objConnection.Close

    app.OpenCurrentDatabase strPath, , ""

    For Each vbc In app.VBE.ActiveVBProject.VBComponents

    ProcessModule vbc.CodeModule, strPath

    Next vbc

    ExitHere:

    On Error Resume Next

    ' If Err = 2467 Then

    ' app.CloseCurrentDatabase

    ' Exit Sub

    ' End If

    app.CloseCurrentDatabase

    End Subbut it just glides through the ShowSchema function without any error when it encounters a password-protected mdb(which I've attached to this post); for your info, the content of the immediate window, after it does that is

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents

    tblEvents