Quote Originally Posted by LaVolpe
I don't see how you will get around it. The file will be in a format of one UDT or the other. In order to load them using VB's Get method, you would have to provide VB with the proper UDT structure.

Eluded to in the previous post, another option is to simply convert old UDT to new UDT as needed. This still requires 2 UDTs initially. Read one & convert, read next and convert, etc. Yet another option is to read the file manually vs reading in UDTs by index, but is more work IMO and requires reading each UDT member individually.

Please keep in mind what I said about the old app version not being able to read the new file version. I think this is another problem that isn't being addressed. There is no way the older version can determine if the file format is different. It will read the new version file incorrectly, period. The old version cannot be compatible with new format, but the new version can be compatible with old format.

Regarding dates? I wouldn't rely on it. What if the old app version creates/updates a file, the new version app may mistakenly think the file is in the new format, no?

Edited: I'd insert into the new UDT, as the first member, a Version member. This will definitively let you know which format the file is in by checking that member in IsDate() as described in previous post. Again the assumption is that the old UDT first member was also Date.
I don't see a problem with an old version trying to read a new version. The old version only creates old UDT's.
How would i read the first 10 bytes of the file?
Using this to open: Get miFilenumber, miIndex, gCustomer