Checking to see whether a string contains a certain character

  • Thread starter Thread starter ajitpalsingh200
  • Start date Start date
A

ajitpalsingh200

Is there any way to check whether string "chair" contains "*" or not?

thankx in advance
 
Use function InStr():

InStr(1, "chair", "*") returns 0 bcause * isn't found in "chair";
InStr(1, "chair", "h") returns 2, because h is found in the second position
in "chair" starting from 1.

HTH,
Nikos
 

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