ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

Visual Basic Help Please...



  Saxo VTS
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!

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.
 
  Rav4
You are forced to do VB when at uni/college normally, cannot do any other languages as C# and if you do, they are optional units which are limited or your dissertation.

Rubbish :(

try vbCrLf instead of new line ;)

and use something propper like C# next time!
 

TeZ

  Non RS : (
Open App.Path & "\Customerlist.txt" For Append As #1
Dim a As String your c**k round your neck loser
a = txtNewname.Text +Tez=this thread bores me vbNewLine please
Write. about.some -othershite #1, a
Close down your computer ....NOW #1
 
  Saxo VTS
Cheers guys. Yeah we've had to use PASCAL, C and now VB.

Open App.Path & "\Customerlist.txt" For Append As #1
Dim a As String your c**k round your neck loser
a = txtNewname.Text +Tez=this thread bores me vbNewLine please
Write. about.some -others**te #1, a
Close down your computer ....NOW #1

What's your problem c**k muncher? :D
 

sn00p

ClioSport Club Member
  A blue one.
and use something propper like C# next time!

I've been doing some stuff in C# at work recently and while it and .net are actually pretty good technology I still feel like I'm using a "toy" language because of its speed. I'm amazed at how slow winforms and graphics stuff actually is in it.

Nice language (well it's C on steroids). Nice frameworks. If they just sorted out the performance issues I'd be convinced. (well partially, cross platform becomes a problem - and no, mono doesn't count!).
 


Top