How to open HP ALM from excel VBA

sai sai
sai sai used Ask the Experts™
on
when the below code is run, ALM is not getting launched and there is no error message getting displayed.

Could you please let me know if any changes are to be made to the below code:


Dim QCConnection As Object;

Set QCConnection= createObject ('TDApiOle80.TDConnection')

Dim sUsername, sPassword

Dim sProject, sDomain


sUsername=sheet1.Range(A1).Value

sPassword=sheet1.Range(B1).Value


sProject=sheet1.Range(C1).Value

sDomain=sheet1.Range(D1).Value

QCConnection.InitConnectionEx sheet1.Range(E1).Value

QCConnection.login sUsername,sPassword

QCConnection.connect sDomain,sProject
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011
Commented:
Try this
Public QCConnection As Object
On Error GoTo CheckError
Set QCConnection = CreateObject("TDApiOle80.TDConnection")
Dim sUsername, sPassword

Dim sProject, sDomain
sUsername=sheet1.Range(A1).Value
sPassword=sheet1.Range(B1).Value
sProject=sheet1.Range(C1).Value
sDomain=sheet1.Range(D1).Value
QCConnection.InitConnectionEx sheet1.Range(E1).Value
QCConnection.login sUsername,sPassword
QCConnection.connect sDomain,sProject 
'any other code
Exit Sub

CheckError:
MsgBox "Error : " & Erl & Err.Number & " : " & Err.Description
QCConnection.Disconnect
QCConnection.Logout
QCConnection.ReleaseConnection

Open in new window

Top Expert 2011
Commented:
Also there are reported cases where add ins do not work if folders are not properly created
Could you check if the following path exists?
c:\program files\microsoft Office\Office\XLStart\TDAddin\Tasks

Similar issues described here:
https://community.saas.hpe.com/t5/Quality-Center-ALM-Practitioners/Excel-Add-in-problem/m-p/989761#.VVeArOHD9dg
Top Expert 2011

Commented:
provided valid recommendation

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial