BuilderSpec
Programmer
Type Layout1
UserName As String * 20
StarSign As String * 20
End Type
Dim rec As Layout1
Dim str As String
Function PopulateType()
Open "C:\Signs.txt" For Input As #1
While Not EOF(1)
Input #1, str
Debug.Print "Name = [" & rec.UserName & "]"
Debug.Print "Sign = [" & rec.StarSign & "]"
Wend
Close #1
End Function
Hi all
above is my attempt at reading a record from an ascii file and then trying to overlay the input with a record layout. I read the line into a string ( str ) but how do i then "transfer" or copy that string into "rec", or is there a way using the "input #1" functions that will let me read directly from the file into a "record" type ?
BuilderSpec
UserName As String * 20
StarSign As String * 20
End Type
Dim rec As Layout1
Dim str As String
Function PopulateType()
Open "C:\Signs.txt" For Input As #1
While Not EOF(1)
Input #1, str
Debug.Print "Name = [" & rec.UserName & "]"
Debug.Print "Sign = [" & rec.StarSign & "]"
Wend
Close #1
End Function
Hi all
above is my attempt at reading a record from an ascii file and then trying to overlay the input with a record layout. I read the line into a string ( str ) but how do i then "transfer" or copy that string into "rec", or is there a way using the "input #1" functions that will let me read directly from the file into a "record" type ?
BuilderSpec