View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Best/Easiest way to search/find in a string

In my statement above,
vbTextCompare forces a case insensitive search to take place (you can
specify vbBinaryCompare which forces an case sensitive search to take
place,
but specifying it is unnecessary as it is the default condition for
searches
when not specified).
'---------------

Perhaps you would permit one small addendum?

I believe that, if the optional Comparison argument of the
Instr method is omitted, the text comparison method is
determined by the value of the Option Compare statement;
in the absence of an Option Compare declaaration, the
default text comparison method would be Binary,


That may be true... but I don't know for sure as the only Option statement I
ever use is Option Explicit. You must understand, I come from the compiled
VB world and, in a work environment, those other Option statements just seem
to lead to confusion when code is being developed and/or maintained by
multiple people.

Rick