("00000000" &amp; Hex$(lErr), 8)
        End If
        msg = msg &amp; " - " &amp; sDesc
    End If
    Cur = Screen.MousePointer
    Screen.MousePointer = vbNormal
    MsgBox msg, vbOKOnly + vbExclamation, App.Title &amp; ": Error"
    Screen.MousePointer = Cur
End Sub

Public Function ApiError(ByVal e As Long) As String
    Dim s As String, c As Long
    s = String(256, 0)
    c = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM Or _
                      FORMAT_MESSAGE_IGNORE_INSERTS, _
                      pN