This function checks if the specified region contains the selected post code.
object.ContainsPostCode(PostCode)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISRegion interface |
|
PostCode |
In, Required | The postcode related to the region |
bool
Display ContainsPostCode for the region.
Dim aPostCode1, aPostCode2
Dim aRegions, aRegion
Dim aMessage
Dim i
set aPostCode1 = Profile.LookupPostCode("", "Mara", "CAN", "BC")
if aPostCode1 is nothing then
exit sub
end if
set aPostCode2 = Profile.LookupPostCode("", "Mara", "CAN", "BC")
if aPostCode2 is nothing then
exit sub
end if
set aRegions = aPostCode1.Regions
aMessage =_
"Country Code: " & VbTab & aPostCode1.CountryCode & vbNewLine &_
"Postal Code: " & VbTab & aPostCode1.PostalCode & vbNewLine &_
"Regions Count: " & VbTab & aRegions.Count
for i = 0 to aRegions.Count - 1
set aRegion = aPostCode1.Regions.Item(i)
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 &_
"Contains Post Code '" & aPostCode2.PostalCode & "' :" & VbTab &_
aRegion.ContainsPostCode(aPostCode2)
next
Profile.MsgBox (aMessage)
In Profile Client v8 on User Interface Post Code can be found in
.