Yes it's assingment time again and as usual FincH wasn't listening properly in class!
I've got a nasty file handling exercise to do and am a bit stuck on formating me trusty old text files!
That's the code I'm using to create, write and add to a file of customers names. All well and good but when I output the file using the following code:
The data output to the list box looks like this:
Where as I need it to be each name on a new line and without the quote marks.
Please someone help me! I'll give you my pet Ant called Larry!
Cheers.
I've got a nasty file handling exercise to do and am a bit stuck on formating me trusty old text files!
Code:
Open App.Path & "\Customerlist.txt" For Append As #1
Dim a As String
a = txtNewname.Text + vbNewLine
Write #1, a
Close #1
That's the code I'm using to create, write and add to a file of customers names. All well and good but when I output the file using the following code:
Code:
Open App.Path & "\Customerlist.txt" For Input As #1
While Not EOF(1)
Line Input #1, temp$
alltext$ = alltext$ & temp$ & vbNewLine
Wend
lstCustomers.AddItem alltext$
Close #1
The data output to the list box looks like this:
"Dave Hedgehog""Spud Gun""Richard Richard"
Where as I need it to be each name on a new line and without the quote marks.
Please someone help me! I'll give you my pet Ant called Larry!
Cheers.