View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default THE "INSTR" FUNCTION !!!

If InStr(1,TextBox1.Text,ComboBox5.Text,vbTextCompare ) 0 Then

End If

If this post helps click Yes
---------------
Jacob Skaria


"jay dean" wrote:

Hello -

Both combobox5 and textbox1 contain text strings. I am trying to
determine if the string selected from the dropdown list in combobox5 is
found in textbox1. If I use the following statement:

If InStr(ComboBox5.Value, TextBox1.Value, vbBinaryCompare) 0 then ....

I get the error: "Type mismatch."
Any help with a better statement would be appreciated.

Thanks!
Jay

*** Sent via Developersdex http://www.developersdex.com ***