DataFieldLabels property

Returns the field labels or names for a specified data set as an array of strings. The default name is returned if the values have not been changed. Read-only Variant.

Applies to

Objects:  DataMap




Part Description
object Required. An expression that returns a DataMap object.


      Sub DisplayFirstAndLastDataFieldLabel()
    Dim objApp As New MapPoint.Application
    Dim objDataSet As MapPoint.DataSet
    Dim objDataMap As MapPoint.DataMap
    Dim objFields(1 To 3) As Variant 'MapPoint.Field

    'Set up application and objects to use     objApp.Visible = True     objApp.UserControl = True     Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()     Set objFields(1) = objDataSet.Fields("Households (1990)")     Set objFields(2) = objDataSet.Fields("Households (2000)")     Set objFields(3) = objDataSet.Fields("Households (2004)")     Set objDataMap = objDataSet.DisplayDataMap(geoDataMapTypeCategoricalColumn, _       objFields, geoShowByRegion1, , geoRangeTypeContinuousLog)
    'Display the first data field label     MsgBox objDataMap.DataFieldLabels(0)     'Display the last data field label     MsgBox objDataMap.DataFieldLabels(UBound(objDataMap.DataFieldLabels))     'Note: We know the value is 2 in this case,     'but using UBound on the array will return     'the last field even in cases where we do not   End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.