Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find a string within a variable string

Status
Not open for further replies.

smiler44

Technical User
Sep 18, 2009
83
GB
how do I find a string within a variable string?
I think that's the question I want to ask? The length of my variable string will vary and I want to find 3 letters within the variable string, each time I check they could be in a different location within the variable string.


variable string = "this is my variable string sentence this time"

how do I check to see if var is in the variable string?

thank you smiler44

 
InStr(string1, string2)

Return where in string1, string2 is. If string2 is not in string1 it returns 0.

Regards Lakare
 
Thankyou Lakare,
I will give that a go
smiler44
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top