Count rows in text file by loading into array
Perhaps use the old I/O routines? ...
Open the file using 'Open'
Pre-read using Input# into InputString
i = 1
Do
cells(i,1).value = InputString
refresh InputString using Input#
i = i + 1
until EOF or i 32001
Close the file using 'Close'
"L Mehl" wrote in message
...
Hello --
The app can allow no more than 32,000 data points (1 column of numbers) to
be imported using a text file.
[1]
Is there a way to load the file into an array, count the records loaded,
and
warn the user if 32,000 has been exceeded?
[2]
Then, if not exceeded, the app would then put the array values into a
column
in a worksheet.
Can anyone help with ideas or sample code for doing [1] and [2]?
Thanks for any help.
Larry Mehl
mehl_at_cyvest.com
|