Hi Sal,
Is this basically the same question as <post#=338794>post 338794</post#> in the VB/VBA forum? The code is not 100% the same, but it looks very similar.
Hi Sal,
Is this basically the same question as <post#=338794>post 338794</post#> in the VB/VBA forum? The code is not 100% the same, but it looks very similar.

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Messaggio cancellato da sal21
Messaggio cancellato da sal21
I think the problem is (I don't have time to work thru it all tonite) is that you are ignoring most of the lines of text from the text file. I see 6 lines of code that read a line and then put it into "riga" and then read the next line into "riga" essentially throwing it away. Your text file does not look like it has the structure that only 1 of 7 lines is "parse-able". Based on the "good" output, there are times that you want to read and parse every line, this code will not.
A suggestion to help understand what the code is doing:
Step thru the code and watch what is in Riga at each step.
I do not think you want to ignore any of the lines, but there will be some times you will do something IF the line meets some criteria.
Steve