GetListIndex Method
- Last UpdatedNov 06, 2025
- 1 minute read
The GetListIndex() method performs a search through all items in a combo box for a specified item.
'Declaration
Public Shared Function GetListIndex( _
ByVal cBox As ComboBox, _
ByVal itemToFind As String _
) As Integer
public static int GetListIndex(
ComboBox cBox,
string itemToFind
)
Parameters
- cBox
- Required. Holds the combo box being searched.
- itemToFind
- Required. Holds the string to search for.
Return Value
Returns the index of the matching item in the combo box, or -1 if the item is not
found.