This function returns the index of the string in the list.
object.IndexOf(aItem)
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISStrings interface |
|
aItem |
In, Required | string |
The string value |
int
Display the string list as the text and the index of the specified item.
Dim aStrings
Dim aIndex
Dim aMessage
Set aStrings = Profile.CreateStrings
aStrings.Add "Red"
aStrings.Add "Green"
aStrings.Add "Blue"
aStrings.Add "Black"
aIndex = aStrings.IndexOf("Green")
aMessage = "TEXT : " & vbNewLine & aStrings.Text & vbNewLine &_
"LINE INDEX: " & aIndex
Profile.MsgBox(aMessage)