【发布时间】:2022-01-22 14:54:53
【问题描述】:
我正在尝试使用此代码 sn-p 设置数据点的数据标签属性,但由于某种原因,这些属性未按预期设置。 [请看图片以获得更好的清晰度]。
一种解决方法可能是使用Reset label Text [参见图2],从而强制数据标签更新设置的属性。但我找不到相同的vba。帮助。
'This is happening inside a loop
Dim thisbarpoint As Point
Set thisbarpoint = thischart.FullSeriesCollection(ibar).Points(jbar)
thisbarpoint.DataLabel.ShowCategoryName = True
thisbarpoint.DataLabel.ShowValue = False
thisbarpoint.DataLabel.ShowSeriesName = False
Debug.Print thisbarpoint.DataLabel.caption
Dim DataLabelCaption As String
DataLabelCaption = thisbarpoint.DataLabel.caption
Debug.Print DataLabelCaption 'This gives the value as 26.7%
PIC-1:
PIC-2:
【问题讨论】:
标签: vba powerpoint