Hi Thanks for replying. This is the relevant code :
FileOpen(2, "c:\vbas\Equation.rdf", OpenMode.Random, , , RecordLength:=Len(fqrec))
rpos = 1
FileGet(2, fqrec, rpos) ***** THIS LINE GIVES ERROR ****
While Not EOF(2) ' check if already exists
ListBox1.Items.Add(fqrec.fqval1 & " " & fqrec.fqval2 & " " & fqrec.fycor3 & " " & fqrec.fycor5 & " " & fqrec.fycor7 & " " & fqrec.fycor11)
rpos = rpos + 1
FileGet(2, fqrec, rpos)
End While
===================================================================================================================
Variable fqrec along with its sub-variables is defined in the Modules section.
This works perfectly in VB6.