devxlogo

GetIndexFromText – Return the index in a ListControl given a text

GetIndexFromText – Return the index in a ListControl given a text

' Return the index in a ListControl given a text' Example:'   Dim i As Integer = GetIndexFromText(ListBox1, "hello")Function GetIndexFromText(ByVal lst As ListControl, ByVal value As String) As _    Integer    Return lst.Items.IndexOf(lst.Items.FindByText(value))End Function

devx-admin

Share the Post: