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!

VBTextCompare problem

Status
Not open for further replies.

vbcdor

Technical User
Jan 27, 2004
39
US
Hi all,
I'm having difficulties figuring this one out. I set up a test file which displays a value of 0, 30, 0 and 0 for the code below. This is what it is suppose to do, except I never write a line to the output when the value = 30 (it never executes the Wscript.echo "write a line to output".
Any idea why this is not working?
thanks.

If colMatches.Count > 0 Then
value = InStr(29, sline, ": 0", VBTextCompare)
Wscript.echo "value is "
Wscript.echo value
If InStr(29, sline, ": 0 ", VBTextCompare) <> 0 Then
Wscript.echo "write a line to output "
f.WriteLine (sline)
End If
End if
 
never mind. I finally see the extra space in the If statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top