|
-
Jul 21st, 2003, 04:03 PM
#1
Thread Starter
Fanatic Member
starting a new line: yes another text file question: ANother one resolved!
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
Last edited by evexa; Jul 21st, 2003 at 04:55 PM.
Trust no one
----------------------------------------
http://www.eccentrix.com/members/xeaudrey/exanegotium.html
http://www.eccentrix.com/members/xeaudrey/
-
Jul 21st, 2003, 04:09 PM
#2
-
Jul 21st, 2003, 04:13 PM
#3
Thread Starter
Fanatic Member
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?
Trust no one
----------------------------------------
http://www.eccentrix.com/members/xeaudrey/exanegotium.html
http://www.eccentrix.com/members/xeaudrey/
-
Jul 21st, 2003, 04:35 PM
#4
-
Jul 21st, 2003, 04:43 PM
#5
Thread Starter
Fanatic Member
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!
*Sigh* nobody ever expects it :P most greeks living in the US say Parakalo smash a plate and call themselves greek *ptoo*.
Although i must say my greek is getting worse and worse!
And no - print just writes over it
Trust no one
----------------------------------------
http://www.eccentrix.com/members/xeaudrey/exanegotium.html
http://www.eccentrix.com/members/xeaudrey/
-
Jul 21st, 2003, 04:47 PM
#6
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
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jul 21st, 2003, 04:50 PM
#7
Thread Starter
Fanatic Member
Spend too long working on web pages me thinks 
thank you
xxxxxxxxxxxxxxxxxx
Trust no one
----------------------------------------
http://www.eccentrix.com/members/xeaudrey/exanegotium.html
http://www.eccentrix.com/members/xeaudrey/
-
Jul 21st, 2003, 05:24 PM
#8
np!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|