Ok, the problem is that here
Text1.Text = Input$(LOF(F), F)
you're passing LOF(F) to the Input function, but LOF is Length Of File so it reads the whole file right there. What you need instead is
Line Input #F, Text1.Text
On other thing, it gets a bit tedious to have to do this for each text box, you could make it easier by using the form's Controls collection. Something like this:
Code:
' code to save all values to the registry
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
Call SaveSetting(App.EXEName, "Persist", ctl.Name, ctl.Text)
End If
Next
' code to get the values back from the registry
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
ctl.Text = GetSetting(App.EXEName, "Persist", ctl.Name, "")
End If
Next
You could modify that to save to a text file instead if you want. Also note that 'Me' refers to the form in which the code is placed, if you want you could have this code in a Module or Class and pass in a reference to the form instead.
hth
Phil