VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Returns the Item Position of string within ListItems

by Avital (2 Submissions)
Category: String Manipulation
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Tue 8th August 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Returns the Item Position of string within ListItems

Rate Returns the Item Position of string within ListItems



'*******************************************************
' Purpose : Returns the Item Position of string within ListItems
' Author  : Avital
'*******************************************************
   
   Dim S1 As String, S2 As String
   Dim i As Integer, j As Integer
      
   S1 = sText & "": S2 = sItem & ""
   
   
   If S1 = "" Or S2 = "" Then Exit Function
   For i = 1 To Len(S1)
      If Mid$(sText, i, 1) = sSup Then j = j + 1
   Next i
   
   For i = 1 To j + 1
      If Trim(FindTextItem(sText, i, sSup)) = sItem Then InItems = i: Exit For
   Next i

End Function

Download this snippet    Add to My Saved Code

Returns the Item Position of string within ListItems Comments

No comments have been posted about Returns the Item Position of string within ListItems. Why not be the first to post a comment about Returns the Item Position of string within ListItems.

Post your comment

Subject:
Message:
0/1000 characters