April 2006
Beginner
1114 pages
98h 16m
English
datalabel.NumberFormatLinked [= setting]
True uses the number format from the source range; False uses the NumberFormat or NumberFormatLocal setting. Default is True. Setting either the NumberFormat or NumberFormatLocal property automatically sets NumberFormatLinked to False. Set this property to True to restore the default number format as shown here:
Sub RestoreDataLabelNumberFormat( )
Dim chrt As Chart, sr As Series, ds As DataLabels
Set chrt = ActiveChart
' Get the first series.
Set sr = chrt.SeriesCollection(1)
' Make sure data labels exist.
sr.HasDataLabels = True
' Get the DataLabels collection.
Set ds = sr.DataLabels
' Restore format setting from source range.
ds.NumberFormatLinked = True
End SubRead now
Unlock full access