Rather than the LDB Viewer, why not try the msldbusr.dll? You call it's
methods from your VBA code. I'm using it successfully with a password
protected A97 BE. Here's the code (partial, anyway):
Declare Function LDBUser_GetUsers Lib "MSLDBUSR.DLL" (lpszUserBuffer() As
String, ByVal lpszFilename As String, ByVal nOptions As Long) As Integer
Declare Function LDBUser_GetError Lib "MSLDBUSR.DLL" (ByVal nErrorNo As
Long) As String
Public Const OptAllLDBUsers = &H1
Public Const OptLDBLoggedUsers = &H2
Public Const OptLDBCorruptUsers = &H4
Public Const OptLDBUserCount = &H8
Public Const OptLDBUserAuthor = &HB0B
Dim lRet As Long
Dim strUsers() As String
lRet = LDBUser_GetUsers(strUsers, strDBFile, OptLDBLoggedUsers)
If lRet < 0 Then
If lRet <> -2 And lRet <> -14 Then
strError = LDBUser_GetError(lRet)
MsgBox strError, vbExclamation
LogError Me.Name, lRet, strError, "MSLDBUSR.DLL"
Exit Function
End If
ElseIf lRet > 0 Then
'Users are still connected
strMsg = lRet & " users are still connected!" & vbCrLf & _
"Please make sure these users are logged off:" & vbCrLf
For L = LBound(strUsers) To UBound(strUsers)
strMsg = strMsg & strUsers(L) & vbCrLf
Next
strMsg = strMsg & "Click Retry when ready or Cancel to abort."
iResp = MsgBox(strMsg, vbRetryCancel Or vbInformation)
If iResp = vbRetry Then
GoTo Check_Again
Else
Exit Function
End If
End If