I want to open a file and then have VB go through the entire file trying to match several strings with data in the file, tally how many times they are repeated, and then list them in order of most repeated. Is this possible?
D'oh - i forgot to ask, i'm not sure what kind of statement to use. A quick example?
05-13-2003, 03:50 PM
It's not a statement, it's more than a few lines of code.
¬_¬ well duh .. it obviously starts as
open c:\this.dat for random access read as #1
Could you please help me?
05-13-2003, 03:54 PM
If you have specific questions, sure. If you're just looking for someone to write code for you, www.rentacoder.com
Could you at least give me something to work with?
Why do you not help me and help everybody else.
05-13-2003, 03:59 PM
I think what Reboot is getting at, is that the purpose of this forum is to for people to help you when you are stuck. you write as much code as you can, and then, when you have a problem, you say "here is my problem, i tried to do it this way, but it didn't work. What do you think i should do?" The way you asked your question almost makes it sound like you have a homework assignment, that you have no idea how to do, and you want us to do it for you. we dont want to be rude. but we also dont want to do all of your coding for you.
05-13-2003, 05:01 PM
Here is a quick example of how you might do it. Good luck.
Private Sub Command1_Click()
Open theFile For Input As #1
fileinfo = Input(LOF(1), #1)
myArray = Split(fileinfo, vbCrLf)
For i = 0 To UBound(myArray)
Select Case myArray(i)
Case "another Thing"
'do Something Else