Text is contained
I want to open a text file and read the file one line at a time. If the line
contains certain text, I want to branch and do something different. I
thought this would work:
If vbLine Like "pork" Then
but if the vbLine is "dog,cat,pork" it fails. How do I evaluate for a
portion of the vbLine variable? Other software I've used has a contains
operator:
vbLine!"pork" would mean does the vbLine contain "pork"
vbLine!!"pork" would mean does the vbLine variable NOT contain "pork"
Is there such a think in VBA?
|