opus, i have try your code. when i used "sample.txt" file.it can work. But, when i used another text.file(output.txt - i hv attach the file).it came out an error "invalid procedure call or argument" and highlight the line
Can't tell you why you get this error, you should look up the value of each var at the point of error. Especially what is the value of "data". Does the error occur on the first line of output.txt? If the error is an unwanted value of "data" [my guess is that data has no psace in it like "100"], you have to play arround with the string manipulation.
I didn't put any error-catching in the code giving (that's something you can do!)
Since the original question should be answered, you could close this thread!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button Wait, I'm too old to hurry!