VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2730
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5520
   LinkTopic       =   "Form1"
   ScaleHeight     =   2730
   ScaleWidth      =   5520
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   3360
      TabIndex        =   2
      Top             =   1440
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   3360
      TabIndex        =   1
      Top             =   120
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      Height          =   2175
      Left            =   120
      MultiLine       =   -1  'True
      TabIndex        =   0
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
   Dim srch As String, linedata As String
   Dim i As Integer
   Text1.Tag = ""
   For i = 1 To 50 'enough for 50 lines. extend the loop to as much as required
      If InStr(Text1.Text, vbNewLine) = 0 Then
         linedata = Text1.Text
         Text1.Text = ""
      Else
         linedata = Left(Text1.Text, InStr(Text1.Text, vbNewLine) - 1)
         Text1.Text = Mid(Text1.Text, InStr(Text1.Text, vbNewLine) + 2)
      End If
      If linedata <> Text2.Text Then
         If Text1.Tag <> "" Then Text1.Tag = Text1.Tag & vbNewLine
         Text1.Tag = Text1.Tag & linedata
      End If
      If Text1.Text = "" Then Exit For
   Next i
   Text1.Text = Text1.Tag
End Sub
