• Congratulations to the Class of 2024 on your results!
    Let us know how you went here
    Got a question about your uni preferences? Ask us here

Visual Basic, loading a txt file from the hdd. line brakes dont work (1 Viewer)

f001error

New Member
Joined
Jun 17, 2003
Messages
26
ive sent the mutliline property of my textbox to true, but when the text from the file is loaded all of my line brakes are ingored. any ideas ?
 

neester

Member
Joined
Feb 22, 2003
Messages
30
Location
South Sydney
how are you loading the text file?
Perhaps the text file is using Unix or Mac formatting...

Load the file up like this:

Code:
Dim FF as Integer
Dim LineStr as String
FF = Freefile
Open "FilePath" For Input As FF
Do While Not EOF(#FF)
   Line Input #FF, LineStr
   Text1.Text = LineStr & VbCrLf
Loop
Close FF
I Hope i set that out properly, im in the library and cant test it out here.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top