我正在尝试在我的迷你图中设置自定义值,但是,我不断获得Run-time error: Object doesn't support this property or method
。我的.Custom
值部分中哪里出错?
With spark
.Points.Markers.Visible = True
.Points.Markers.Color.Color = vbBlack
.CustomMinScaleValue = -0.1 'error thrown here
.CustomMaxScaleValue = 1.2 'error will most likely be thrown here
End With
答案 0 :(得分:1)
CustomMinScaleValue属性只能在。时返回或设置 设置指定的SparkVerticalAxis对象的MinScaleType属性 到xlSparkScaleCustom(3)。
https://msdn.microsoft.com/en-us/library/office/ff194837.aspx
CustomMaxScaleValue
未测试:
With spark
.Points.Markers.Visible = True
.Points.Markers.Color.Color = vbBlack
.Axes.Vertical.MinScaleType = xlSparkScaleCustom '<<<
.CustomMinScaleValue = -0.1
.Axes.Vertical.MaxScaleType = xlSparkScaleCustom '<<<
.CustomMaxScaleValue = 1.2
End With