title: VBScript - Create a dynamic variable name based on another variable's value
body: <p>I have stored the 'ServiceName' values in an excel file for parametrization (Code - Line 4). </p>
  
  <pre><code>Format in Excel: 
      ServiceName     (Header)
      EisOrdAmd
      EntCanAmd
  </code></pre>
  
  <p>I want to use dynamic variable names for the 3rd argument in 'fnExcQuery' function based on the parameters passed (Line 5), i.e., for the 1st loop the variable name should be 'strQuery_EisOrdAmd' and for the 2nd loop it should be 'strQuery_EntCanAmd'  </p>
  
  <pre><code>1.  ststrQuery_EisOrdAmd = "Select * from EisOrdAmd"
  2.  strQuery_EntCanAmd = "Select * from EntCanAmd"
  3.  Do While (Not objRecordSet_TestData.EOF)
  4.      strServiceName = Trim(objRecordSet_TestData.fields("ServiceName"))
  5.      blnResponse_Request = fnExcQuery(strUser, strPwd, strQuery_&lt;strServiceName&gt;)            
          '1st Loop: strQuery_EisOrdAmd ; 2nd Loop: strQuery_EntCanAmd 
  6.      objRecordSet_TestData.MoveNext
  7.  Loop
  </code></pre>
  
  <p>How could I create dynamic variable name for the 3rd argument. I couldn't able to find a solution using vbscript, could you please help.</p>