title: QTP: Checking If an array of strings contains a value
body: <p>I am having trouble getting my test case to run correctly.</p>
  
  <p>The problem is in the code below, the first if statement to be exact. QTP complains that an object is required</p>
  
  <pre><code>For j=Lbound(options) to Ubound(options)
      If options(j).Contains(choice) Then
          MsgBox("Found " &amp; FindThisString &amp; " at index " &amp; _
          options.IndexOf(choice))
      Else
          MsgBox "String not found!"
      End If
  Next
  </code></pre>
  
  <p>When I check the array I can see that it is populated correctly and 'j' is also the correct string.
  Any help with this issue would be greatly appreciated.</p>