|
-
Apr 22nd, 2002, 11:15 PM
#1
Thread Starter
Member
Text files
I want to open a text file one line at a time and place each line into its own textbox
Any help would be great
-
Apr 22nd, 2002, 11:29 PM
#2
PowerPoster
something like;
Dim line As String
Open FileName For OutPut As #1
Do Until EOF #1
LineInput #1, Line
Text1.Text = Text1.Text + Line
Line = ""
Loop
-
Apr 22nd, 2002, 11:52 PM
#3
Thread Starter
Member
How do i get the second line into the second textbox
-
Apr 22nd, 2002, 11:56 PM
#4
PowerPoster
Well if its only a 2 line Text File
Dim line As String
Dim Line2 As String
'Open the File
Open FileName For OutPut As #1
'Get the First Line
LineInput #1, Line
Text1.Text = Text1.Text + Line
Line = ""
'Get the Second Line
LineInput #1, Line2
Text2.Text = Text2.Text + " " + Line2
Line2 = ""
Close #1
-
Apr 23rd, 2002, 12:12 AM
#5
Thread Starter
Member
-
Apr 23rd, 2002, 12:13 AM
#6
PowerPoster
-
Apr 23rd, 2002, 03:38 AM
#7
Bouncy Member
if you want to make your program so it does this with bigger files with more lines in and you dont know how many lines and how many test boxes you are going to need you could use a control array of textboxes to acheive this - just adding text boxes when you need them
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
|