Results 1 to 3 of 3

Thread: Loading from file....

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Posts
    25
    How do i search for 2 lines of text in a file? 1 being a starting point and one being an ending point and load the lines inbetween?

  2. #2
    Megatron
    Guest
    Code:
    Dim bRead As Boolean
    Dim sFile As String
    
    Open "MyFile" For Input As #1
    Do Until EOF(1)
        Line Input #1, tmp
        If tmp = "My First line" Then bRead = True
        If tmp = "My Last Line" Then
            bRead = False
            Exit Do
        End If
        If bRead = True Then sFile = sFile & tmp & vbCrLf
    Loop
    Close #1

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Posts
    25
    Thank ya kindly

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