The post codes related to the specified region.
object.PostCodes
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRegion interface |
Display some information about the region, including its post codes.
Dim aPostCode
Dim aRegions, aRegion
Dim aMessage
Dim i, j
Dim aRegionPostCodes
Dim aPostCodesStr
Set aPostCode = Profile.LookupPostCode("", "Mara", "CAN", "BC")
if aPostCode is nothing then
exit sub
end if
set aRegions = aPostCode.Regions
aMessage =_
"Country Code: " & VbTab & aPostCode.CountryCode & vbNewLine &_
"Regions Count: " & VbTab & aRegions.Count
for i = 0 to aRegions.Count - 1
set aRegion = aRegions.Item(i)
set aRegionPostCodes = aRegion.PostCodes
aPostCodesStr = ""
for j = 0 to aRegionPostCodes.Count - 1
aPostCodesStr = aPostCodesStr & aRegionPostCodes.Item(j).PostalCode & ", "
next
aMessage = aMessage & vbNewLine &_
"------------------ Region " & (i + 1) & " ---------------- " & vbNewLine &_
"Code: " & VbTab & VbTab & aRegion.Code & VbTab & vbNewLine &_
"Name: " & VbTab & VbTab & aRegion.Name & vbNewLine &_
"ID: " & VbTab & VbTab & aRegion.ID & vbNewLine &_
"Post Codes Count: " & VbTab & VbTab & aRegionPostCodes.Count & vbNewLine &_
"Post Codes: " & vbNewLine &_
aPostCodesStr
next
Profile.MsgBox (aMessage)
In Profile Client v8 on User Interface Post Codes can be found in
.