Results 1 to 6 of 6

Thread: ctrlf is gone when i use the right function

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member schuurke28's Avatar
    Join Date
    Feb 2001
    Posts
    402

    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

    iRight = 550

    Do While Not EOF(1) ' Controle op einde bestand

    Line Input #1, sString

    sRightString = Right(sString, iRight)
    Debug.Print sRightString

    Print #2, sRightString
    Debug.Print sFinalString

    Loop
    Close #1
    Close #2
    End Sub
    Attached Files Attached Files
    Last edited by schuurke28; Feb 7th, 2001 at 11:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width