Excel 365 ProPlus-VBA-点对象-方法设置属性和获取属性

时间:2019-07-08 14:13:37

标签: excel vba

有人知道如何使用吗?是否可以通过这些方法设置透明度?您是否有文档链接?官方文档未提及以下方法:

https://docs.microsoft.com/en-us/office/vba/api/excel.point%28object%29

Option Explicit

Sub Main()
    Dim ws As Worksheet
    Dim chartObj As ChartObject
    Dim chart As chart
    Dim seriesCol As SeriesCollection
    Dim series As series
    Dim points As points
    Dim point As point
    Dim x As Object

    Set ws = ActiveSheet
    Set chartObj = ws.ChartObjects(1)
    Set chart = chartObj.chart
    Set seriesCol = chart.SeriesCollection
    Set series = seriesCol.Item(1)
    Set points = series.points
    Set point = points.Item(1)

    point.SetProperty "Transparency", 0.5
    Set x = point.GetProperty("Format")
End Sub

enter image description here

enter image description here

0 个答案:

没有答案