-
Hey, is there a way i could open a TEXT FILE
and COMPARE each line with something else...
Example:
CText = "Hey There"
File:
Yo
What Up
Hey There <----compares to EACH line and finds this one
Whats New
so it will compare itself to EACH line of a text file.. if a match is found.. it will do something.. if not it'll do something else
THANKS
-
I had to something similar for a kind if dictionary I had to create. What I had to do was loop through each line in a file and compare it using strComp(Str1, str2, vbTextCompare).
Returns:
string1 is less than string2 -1
string1 is equal to string2 0
string1 is greater than string2 1
string1 or string2 is Null Null
I used
str1 = object.readline (from the TextStream Object Model)and str2 = MyString.