Quantcast
Channel: All Quality Center / ALM Practitioners Forum posts
Viewing all articles
Browse latest Browse all 14708

Re: How to add a bunch of TSTest Objects to a list in excel VBA OTA API?

$
0
0
Dim Test As TSTest

Dim tsetList As List 'tsetList contains the list of tests under a particulat Testset

For Each Test In tsetList
     If Test.HasAttachment = False Then
          ListBox2.AddItem Test.Name
          Set tsetList2 = Test 'Getting a type mismatch error
     End If
Next

 Where do you populate tsetList with tests?  I see you have declared it in the Dim statement, but then you start using it in the For Each statement without populating it.

 

Where is your declaration for tsetList2?  Is it supposed to be a list also?  If so, you can't set a List to be equal to a non-list entity (Test). If you want to add something to a list then you need to use its Add method -

<ListObject>.Add(<ThingToAdd)

 

 


Viewing all articles
Browse latest Browse all 14708

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>