you can use split to seperate your POC, compname ,and notam if u have a deliminator!
or you could see the below code (a bit overkill given your situation but.. hey if it helps!!)
(needs a ref to microsoft VBscript regular expressions)
Dim RE As RegExp
Dim MC As MatchCollection
Dim M As Match
Dim mystring As String
Dim mysearch As String
Private Sub Command1_Click()
'sample of data entry
mystring = "POC1" & "compname1" & "notam1" & vbCrLf & _
"POC1" & "compname2" & "notam2" & vbCrLf & _
"POC1" & "compname3" & "notam3" & vbCrLf & _
"POC2" & "compname1" & "notam4" & vbCrLf & _
"POC2" & "compname2" & "notam5" & vbCrLf & _
"POC3" & "compname1" & "notam6" & vbCrLf & _
"POC3" & "compname2" & "notam7" & vbCrLf & _
"POC3" & "compname3" & "notam8" & vbCrLf
'get the search criteria
' mysearch = InputBox("Enter a search criteria.", "Enter a search criteria."

' mysearch = "compname1"
mysearch = Text1.Text 'validate this string in whatever way you need!
FindMe mystring, mysearch
End Sub
Private Sub FindMe(StringToSearch As String, StringToFind As String)
Set RE = New RegExp
StringToFind = ".*" & StringToFind & ".*" & "\n" 'padded because i dont know how your string is deliminated
RE.IgnoreCase = True
RE.Global = True
RE.Pattern = StringToFind
Set MC = RE.Execute(StringToSearch)
For Each M In MC
' Debug.Print "Value Reads:" & M.Value
List1.AddItem M.Value
Next M
End Sub
Private Sub Form_Load()
Text1 = "compname1"
End Sub
like i said.. overkill but hey! it may help!
good luck!
If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
come on... get involved!
To get the best response to a question, please check out FAQ222-2244 first
A General Guide To Excel in VB FAQ222-3383