instr function

  • Thread starter Thread starter placek
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top