a cry for help, i need to put a ctrlf in a textfile after using the right function
in the text file there is a ctrlf on position 600.
I need the 550 positions of the right (with the ctrlf), i
used the right function because i don't need the first 50 characters of the left.
But, the right function gives a result without the ctrlf (control line feed) caracter.
How can i obtain that this character is set on position 600?
see attachement for text file
code:
Sub Main()
Open "C:\Program Files\Protime\ProTime Premium\magi2.txt" For Input As #1 ' Open bestand voor invoer
Open "C:\Program Files\Protime\ProTime Premium\magi3.txt" For Output As #2 'open bestand voor uitvoer
well ...
the format is not holding up when I save the attachments...but...
Open "C:\magi.txt" For Input As #1
Open "C:\magi2.txt" For Output As #2
Do Until EOF(1)
Line Input #1, Getit
Getit = Right(Getit, 550)
Print #2, Getit & vbCrLf
Loop
Close #1
Close #2
should work fine....
Last edited by Static; Feb 7th, 2001 at 12:49 PM.
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"