AutoUpdate 属性

       

如果数据源改变时 OLE 对象将自动更新,则该值 True。仅当对象是链接方式时有效(该对象的 OLEType 属性必须设为 xlOLELink)。Boolean 类型,只读。

示例

本示例显示 Sheet1 的所有 OLE 对象的自动更新状态。

Worksheets("Sheet1").Activate
Range("A1").Value = "Name"
Range("B1").Value = "Link Status"
Range("C1").Value = "AutoUpdate Status"
i = 2
For Each obj In ActiveSheet.OLEObjects
    Cells(i, 1) = obj.Name
    If obj.OLEType = xlOLELink Then
        Cells(i, 2) = "Linked"
        Cells(i, 3) = obj.AutoUpdate
    Else
        Cells(i, 2) = "Embedded"
    End If
    i = i + 1
Next