Re: Substring check within VBA

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can also use

If str2 like "*" & str1 & "*" Then
....

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Gary's Student" <GarysStudent@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8B0AF671-A4BA-4B43-9036-B6425DE80C85@xxxxxxxxxxxxxxxx
> If Str1 and Str2 are strings, is there a function or simple coding within
VBA
> to return TRUE if Str1 is a substring of Str2, otherwise FALSE?
>
> Thanks in advance
> --
> Gary's Student


.



Relevant Pages