title: How to use 2 variables in vbscript for InStr Function in VBScript
body: <p>'I need to be able to use two variables, (strings) in the instr function but it will not return proper values, the first example is the style i need. but cant seem to get it to work. any help would be greatly appreciated. ive been working on this for 3 days..its filling me with rage.</p>
  
  <pre><code>    Option Explicit
      dim message, searchTerm, position
  
       message = "bob dole was here"
       searchTerm = "dole"
  
       position = InStr(message, searchTerm)
       'This always returns 0
  
  
       position = InStr("bob dole was here", searchTerm)
       'This returns 5, which is accurate
  
       position = InStr(message, "dole")
       'This returns 0,
  </code></pre>