-
Jan 25th, 2013, 11:31 AM
#1
Thread Starter
Addicted Member
[RESOLVED] dropping text
How do i make the code drop the first 10 characters from each line of the source txt?
Code:
Open "source.txt" For Input As #1
Open "destination.txt" For Output As #2
Do While Not EOF(1)
Line Input #1, LineOfText
Print #2,
Print #2, LineOfText
Loop
Close #1
Close #2
Last edited by ondalor; Jan 25th, 2013 at 11:46 AM.
Reason: code error
-
Jan 25th, 2013, 12:34 PM
#2
Re: dropping text
Code:
Dim sLineOfText As String
Dim sLineOfTextShortened As String
sLineOfText = "1234567890abcdefgh"
sLineOfTextShortened = Mid(sLineOfText, 11)
-
Jan 25th, 2013, 12:37 PM
#3
Re: dropping text
In the case of the code in the OP
Code:
Print #2, Mid$(LineOfText,11)
-
Jan 25th, 2013, 01:17 PM
#4
Thread Starter
Addicted Member
Re: dropping text
..... how do I get it to drop the first 10 characters of each line?
please explain i don't know what that last post means Datamiser -_-
-
Jan 25th, 2013, 01:32 PM
#5
Re: dropping text
Perhaps it would be a good idea to look up the Mid() function rather than having me type out an explaination
-
Apr 9th, 2013, 11:54 AM
#6
Thread Starter
Addicted Member
Re: dropping text
simple and to the point the mid fuction has been a life saver
Live for the nights you won't remember with the friends you will never forget.
Tags for this Thread
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
|