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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Instr function vbscript

Status
Not open for further replies.

Adohr

Technical User
Oct 27, 2017
2
0
0
US

Regarding Instr function:

Is it possible to verify that a number is > or < a particular value?

for example,

If InStr(1, str1, str2, 1) > 0 Then
msgbox "PASS: str1 is greater than str2"
End If
 
Hi,

???

Can you post an example? What are typical values of Str1 & Str2?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
I'm confused by your question. The code you posted is correct, assuming that you are using InStr as intended (to see if str2 can be found inside str1).

Or are you saying that str1 and str2 are numbers, and you want to do a numeric comparison on them???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top