instr function

P

placek

Hello

I am using the instr function in my module and i just want
to check that i am doing it right. Basically, i want the
program to do something when rec(1) is found to contain
strBookSpec. So, the code goes...............

If InStr(1, rec(1), strBookSpec) Then
..
..
..
..

Am i doing this right, or not?

Martin
 
A

Alex Ivanov

That works because the result of the instr is implicitely converted to
boolean.
Generally, instr(start, string, substring) returns the position of the first
occurrence of the substring after start or 0 if not found.
 
Top