title: Cannot read parameter name (!not value) from Excel
body: <p>The idea is to create a keyword framework with dynamic properties, as much as possible. Keywords to read from Excel:</p>
  
  <pre><code>Keyword=Trim(TS_Sheet.cells(j,"D"))
  Arg1=Trim(TS_Sheet.cells(j,"E"))
  Arg2=Trim(TS_Sheet.cells(j,"F"))
  Arg3=Trim(TS_Sheet.cells(j,"G"))
  Arg4=Trim(TS_Sheet.cells(j,"H"))
  'Execute the corresponding test Steps(Or Keywords)
  Call_Function Keyword, Arg1, Arg2, Arg3, Arg4
  </code></pre>
  
  <p>Call_Function should execute steps:</p>
  
  <pre><code>Function Call_Function (Keyword, Arg1, Arg2, Arg3, Arg4)
  On Error Resume Next
  Print "Keyword for execution is:- " &amp; Keyword
  Dim subS1 : Set subS1 = GetRef(cstr(Keyword))(Arg1, Arg2, Arg3, Arg4)
      If Err.Num&lt;&gt;0 Then
          Msgbox "Error: "&amp;Err.Num, "OK", "Runtime Error "&amp;Err.Num
          reporter.ReportNote "Error occured: "&amp;Err.Num&amp;" keyword: "&amp;keyword&amp;" TCID: "&amp;TCID&amp;" TSID: "&amp;TSID
      End If
  Mybrowser.Sync
  Err.Clear
  On Error GoTo 0
  Set subS1 = Nothing
  End Function
  </code></pre>
  
  <p>I need to wait for a property to be reached using WaitProperty, Chekproperty or any other methot, like</p>
  
  <pre><code>MyBrowser.WebButton("html id:=.*"&amp;Arg2).WaitProperty ("disabled", Arg4, 1)
  </code></pre>
  
  <p>BUT I need to pass the parameter to wait from Excel to make it more dynamic, like</p>
  
  <pre><code>MyBrowser.ChildObject("micclass:=.*"&amp;Arg1, "html id:=.*"&amp;Arg2).WaitProperty (Arg3, Arg4, 1)
  </code></pre>
  
  <p>So far, it did not work. QTP just skips that part of code.
  I tried something like following:</p>
  
  <pre><code>Function Wait_Property (Arg1, Arg2, Arg3, Arg4)
      Process=".."
      Do
      For Iterator = 1 To 100 Step 0.5 '///this can be any number just to make sure loop executes long enough to property to be reached
      If MyBrowser.ChildObject("micclass:=.*"&amp;Arg1, "html id:=.*"&amp;Arg2).WaitProperty (Arg3, Arg4, 0.1) Then
          Print "Reached."
          Exit Do
      Else
          Print "Wait. Processing.."&amp;Process
          Wait 0.5
      End If
      Process = Process+".."
      Next
      Loop While False
  End Function
  </code></pre>
  
  <p>Also I tried <code>...If MyBrowser.ChildObject("micclass:=.*"&amp;Arg1, "html id:=.*"&amp;Arg2, Arg3=Arg4).Exist Then...</code> but QTP still skips that.</p>
  
  <p>What's wrong? Is there any other way to do that?</p>
  
  <p><strong>UPD 1:</strong>
  The following is working now:</p>
  
  <pre><code>PropWait = cstr(Browser("micclass:=Browser","CreationTime:=0","name:=.*").page("micclass:=Page","CreationTime:=0","Title:=.*").WebButton("html id:=.*"&amp;Arg2).GetROProperty(Arg3))
  Do Until cstr(PropWait) = cstr(Arg4)
  If PropWait = Arg4 Then
      Exit Do
      ElseIf PropWait = "" Then 
  print "PropWait Empty"
      Exit Do
      Else
  End If
  Wait 2
  Print PropWait&amp;" : Wait. Processing.."&amp;Process
  Process = Process+".."
  PropWait = cstr(Browser("micclass:=Browser","CreationTime:=0","name:=.*").page("micclass:=Page","CreationTime:=0","Title:=.*").WebButton("html id:=.*"&amp;Arg2).GetROProperty(Arg3))
  Loop
  </code></pre>
  
  <p>But I need micclass to be dynamic, too.</p>
  
  <p><strong>UPD 2:</strong>
  Added description.create to previous update:</p>
  
  <pre><code>Dim WaitObj : Set WaitObj = Description.Create
  WaitObj("micclass").Value = Arg1
  WaitObj("html id").Value = Arg2
  
  PropWait = Browser("micclass:=Browser","name:=.*").page("micclass:=Page","Title:=.*").ChildObjects(WaitObj).GetROProperty(Arg3)
  </code></pre>
  
  <p>But QTP skips it and everything following this peace.</p>
  
  <p><strong>UPD 3</strong>:</p>
  
  <p>As advised in comments, tried to comment <code>On Error Resume Next</code> in <code>Call_Function</code>, but now after first step (which is to open browser) it returns error:  </p>
  
  <blockquote>
    <p>"Object required: 'GetRef(...)(...)"</p>
  </blockquote>
  
  <p><strong>UPD 4:</strong>
  Tried to put <code>On Error Resume Next</code> in Wait_Property Function: (<code>On Error Resume Next</code> in <code>Call_Function</code> uncommented)</p>
  
  <pre><code>Function Wait_Property (Arg1, Arg2, Arg3, Arg4)
  On Error Resume Next
  ...
  </code></pre>
  
  <p>Now, not sure if it recognizes the object, but it prints next (while the property in Arg3 has a value:</p>
  
  <blockquote>
    <p>PropWait = </p>
    
    <p>PropWait Empty</p>
  </blockquote>