ISState.Description

Description

The code description of each state for the country, if any.

Syntax

object.Description

Part Attribute Type Description
object Required
The object always implements the ISState interface
Restriction: This property is readonly.

Return Value

string

Example

Display the information about the states of the countries, including their code descriptions.

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: "
    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) 
Note:

Version information

Added in v7.8.0