Get text item within text items concated to one string
Get text item within text items concated to one string
Rate Get text item within text items concated to one string
(2(2 Vote))
'**************************************************************
'* Perpuse : get text item within text items concated to one string
'* Author : Avital
'* Example : FindTextItem("AA,BB,CC",2) -> BB
'**************************************************************
Dim i As Integer
Dim iPos As Integer
'look for item
For i = 1 To iItem - 1
iPos = InStr(sText, sSup)
If iPos <> 0 Then
sText = Mid$(sText, iPos + 1)
Else
Exit For
End If
Next i
If i = iItem Then
'item is found, cut sSup if necessary
iPos = InStr(sText, sSup)
If iPos <> 0 Then sText = Mid$(sText, 1, iPos - 1)
Else
'item not found
sText = ""
End If
FindTextItem = sText
End Function
Get text item within text items concated to one string Comments
No comments yet — be the first to post one!
Post a Comment