You will need to âteachâ your routine to âread.â My preferred way to open a text file is to add Windows Scripting Runtime as a reference in the projectâs references, and use the FileSystemObject. (See help on that, and opening a TextStream for reading.)
Determine the steps necessary to find the data that you are after, and codify that.
For instance, it looks like in your case it would be something like:
> Read first line of file into string variable
> Find 1st space. (Could be throw away 1st 10 characters.)
> Grab all non-whitespace up toâbut not includingâthe next Chr(46)
> Find InStr( "SIZE" )
> Move right 4 characters
> Get all up toâbut not includingâthe next Chr(46)
And so on.
If there are not specific formats that the text file will conform to, you might not be able to do this.
|