Hi. If I have read in a 40 char fixed length record into a string, can I move this value in one go into a field defined as a 40 char UDT, where the UDT is made up 3 fields; 30, 6 and 4 chars respectively? It seems madness that you have to do every element individually. I have tried the following and it fails with Type Mismatch:
Any help gratefully appreciated.
Code:
Type InfileInfo
field1 As String * 30
field2 As String * 6
field3 As String * 4
End Type
Public Sub ProcessFLFile()
Dim InRecord As InfileInfo, strInRec as string, intInFileNo as integer
strInfile = "C:\filename.txt"
intInFileNo = FreeFile
Open strInfile For Input As #intInFileNo
Do While Not EOF(intInFileNo)
Line Input #intInFileNo, strInRec
InRecord = strInRec ' << type mismatch here