this piece of code makes a line in a text file BUT - the user has to put in more than one line (probably about 20) so how would i get it to add a new line each time they press the same button?
Any insight greatly appreciated
xxxx
:cool:
this piece of code makes a line in a text file BUT - the user has to put in more than one line (probably about 20) so how would i get it to add a new line each time they press the same button?
Any insight greatly appreciated
xxxx
:cool:
What piece of code?
Quote:
Originally posted by manavo11
What piece of code?
VB Code:
Private Sub Command1_Click() Open "e:/corporate/mla/vb/text2.txt" For Output As #1 Print #1, Text1(4).Text & ", " & Text1(0).Text & ". " & Text1(1).Text & " " & Text1(3).Text & ":" & Text1(2) & "." Close #1 End Sub
ise ellinos?
I thought print printed to a new line each time.
Yes I am Greek btw... I never expected you to speek Greek though! ;)
*Sigh* nobody ever expects it :P most greeks living in the US say Parakalo smash a plate and call themselves greek *ptoo*.Quote:
Originally posted by manavo11
I thought print printed to a new line each time.
Yes I am Greek btw... I never expected you to speek Greek though! ;)
Although i must say my greek is getting worse and worse!
And no - print just writes over it :(
Open "e:/corporate/mla/vb/text2.txt" For Append As #1
Print #1, Text1(4).Text & ", " & Text1(0).Text & ". " & Text1(1).Text & " " & Text1(3).Text & ":" & Text1(2) & "."
Close #1
I changed the file type to APPEND
if you open it for output..it will start a new file....append will add to it
also..your SLASHES are backwards ;) e:\etc...\etc...
you have them like a URL :D
Spend too long working on web pages me thinks :)
thank you
xxxxxxxxxxxxxxxxxx
;) np!