HasLinks 属性

       

如果指定的图表链接到了外部数据源,则该值为 TrueBoolean 类型,只读。

示例

如果图表没有链接,本示例将清除数据表上的单元格区域 A1:D4。

With myChart.Application
    If .HasLinks = False Then 
        .DataSheet.Range("A1:D4").Clear
    End If
End With