|
-
Jul 27th, 2000, 03:29 AM
#1
Thread Starter
Hyperactive Member
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
-
Jul 27th, 2000, 04:47 AM
#2
Addicted Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|