The name for the pair 'name - value' returned by its index in the string list.
object.Names(aIndex)
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISStrings interface |
|
aIndex |
In, Required | int |
The index of the pair 'name - value' |
string
Display the names of the strings.
Dim aStrings
Dim aName
Dim aMessage
Set aStrings = Profile.CreateStrings
aStrings.AddAsNameValue " First Name ", " John"
aStrings.AddAsNameValue " Surname ", " Smith"
aMessage = "TEXT : " & vbNewLine & aStrings.Text
aMessage = aMessage & vbNewLine & "NAMES : " & vbNewLine
for i = 0 to aStrings.Count - 1
aMessage = aMessage & " Name # " & i & " = " & aStrings.Names(i) & vbNewLine
next
aMessage = aMessage & vbNewLine & vbNewLine & "VALUES : " & vbNewLine
for i = 0 to aStrings.Count - 1
aName = aStrings.Names(i)
aMessage = aMessage & " Value #" & aName & " = " & aStrings.Values(aName) &_
vbNewLine
next
Profile.MsgBox(aMessage)