Unable to make a connection to ALM 12.5 using vb macro
<p>I have 2 ALM's (11 and 12.5), with the below code, i am able to connect to ALM11, but it says invalid user name and password for 12.5 ALM, (user credentials are correct) </p>

<pre><code>Function ALM_Connection(ByRef TDConnection, server, user, pwd)

    On Error Resume Next
    Dim fileArray
    almLogin.connectionMessage.ForeColor = vbBlue
    Set TDConnection = CreateObject("tdconnection")
    sUserName = user
    sPassword = pwd
    If Trim(sUserName) = "" Or Trim(sPassword) = "" Then
        almLogin.connectionMessage.ForeColor = vbRed
        almLogin.connectionMessage.Caption = "Please Enter the data and click on 'Authenticate'"
        ALM_Connection = False
        Exit Function
    End If
    almLogin.connectionMessage.Caption = " Please Wait.. "
    Application.Wait (Now + TimeValue("0:00:02"))
    TDConnection.InitConnectionEx server
    TDConnection.Login sUserName, sPassword

    If (TDConnection.loggedin &lt;&gt; True) Then
        almLogin.connectionMessage.ForeColor = vbRed
        almLogin.connectionMessage.Caption = "Invalid UserName or Password"
        ALM_Connection = False
        Exit Function
    Else
        almLogin.connectionMessage.Caption = "Logged In Successfully"
        ALM_Connection = True
    End If

End Function
</code></pre>

<p>any help is appreciated</p>