Has anyone had any luck with getting a list of a user's project domains and project names using VBA? I'm trying to login through Excel and extract the information but I've hit a block.
This is what I have at the moment:
Set tdc = CreateObject("TDApiOle80.TDConnection") ... tdc.Login username, password Set projectList = CreateObject("TDApiOle80.List") projectList = tdc.GetAllVisibleProjectDescriptors() For Each project In projectList combo_domain.AddItem (project.Name) combo_project.AddItem (project.DomainName) Next project
The code above throws an error of invalid property or wrong number of arguments on the tdc.GetAllVisibleProjectDescriptors() line but I don't know why. Any idea how to either fix this or look at another approach for getting the information I need?
Answer by ND2610 · Feb 16 at 02:14 PM
Dim QCConnection 'Return the TDConnection object. Set QCConnection = CreateObject("TDApiOle80.TDConnection") Dim sUserName, sPassword sUserName = txtUname.Text sPassword = txtPass.Text Application.ScreenUpdating = False QCConnection.InitConnectionEx "http://tac-qc-prod.cibc.com/qcbin/" QCConnection.Login sUserName, sPassword Set projectList = QCConnection.GetAllVisibleProjectDescriptors For Each project In projectList cmbdom.AddItem (project.DomainName) cmbprj.AddItem (project.Name) Next project
Not giving appropriate Result Giving me output as this one Domain ( have only 2 domain) D1 D1 D1 D1 D2
Project P1 p2 p3 p4 (p1 to p4 are from the First domain) p5 (from 2nd domain)