drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 543
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and Thanks in advance
I have whithin a Folder lot of .CSV files. "I get this files from a Traders Application."
I have to work with this files and get different numbers, names, etc.
I know for sure (If I open those files I will get files with over 150 rows "always")
but if I use the following Code:
X someTimes is equal to 1, but If I open the File it contains >150Rows
What's Going ON???
What am I missing??
Are those files Corrupted?
This is happening with 10% of the Files
I have whithin a Folder lot of .CSV files. "I get this files from a Traders Application."
I have to work with this files and get different numbers, names, etc.
I know for sure (If I open those files I will get files with over 150 rows "always")
but if I use the following Code:
Code:
Dim T As String: T = "C:\Germany\123 122.csv" 'For this eg
Dim F As Integer: F = FreeFile
Dim Textline
Dim X As Long
Open T For Input As #1 ' Open file.
Do While Not EOF(1) ' Loop until end of file.
X = X + 1
Line Input #1, Textline ' Read line into variable.
'..................
Debug.Print Textline ' Print to the Immediate window.
Loop
Debug.Print X
X someTimes is equal to 1, but If I open the File it contains >150Rows
What's Going ON???
What am I missing??
Are those files Corrupted?
This is happening with 10% of the Files