string manipulation

B

banavas

Dear Friends,

does anyone has any piece of code that returns true is string
contains string B and false otherwise?

Thank you in advance.
 
J

JE McGimpsey

Take a look at the InStr method in VBA Help. You can return True/False
with:

Dim bAcontainsB As Boolean
bAcontainsB = InStr(strA, strB) > 0
 
Top