Each of the states within the collection.
object.Item(aIndex)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISStates interface |
|
aIndex |
In, Required | int |
The index of the state |
Display the information about the states of the countries, including their descriptions, codes and IDs.
Dim aCountryItems, aCountryItem
Dim aMessage
Dim aStatesList
Dim aState
Dim i, j
set aCountryItems = Profile.LoadCountryList
aMessage = "Country Items Count: " & aCountryItems.Count
for i = 0 to aCountryItems.Count - 1
set aCountryItem = aCountryItems.Item(i)
set aStatesList = aCountryItem.GetStatesList
aMessage = aMessage & vbNewLine & (i+1) & ") " & aCountryItem.LongName
if not aStatesList is nothing then
aMessage = aMessage & vbNewLine & " States (Count = " & aStatesList.Count & "):"
for j = 0 to aStatesList.Count - 1
set aState = aCountryItem.GetStatesList.Item (j)
aMessage = aMessage & vbNewLine & " -" & aState.Description &_
" (Code: " & aState.Code & "; ID: " & aState.ID & ") "
next
end if
next
Profile.MsgBox(aMessage)