返回或设置一个 XlUpdateLink 常量,该常量指示更新嵌入 OLE 链接的工作簿设置。可读写。
XlUpdateLinks 可为以下 XlUpdateLinks 常量之一。 |
xlUpdateLinksAlways 经常更新指定工作簿的嵌入 OLE 链接。 |
xlUpdateLinksNever 从不更新指定工作簿的嵌入 OLE 链接。 |
xlUpdateLinksUserSetting 按照用户对指定工作簿的设置,更新指定工作簿的嵌入 OLE 链接。 |
expression.UpdateLinks
expression 必需。该表达式返回“应用于”列表中的对象之一。
在本示例中,Microsoft Excel 确定更新链接的设置,并通知用户。
Sub UseUpdateLinks()
Dim wkbOne As Workbook
Set wkbOne = Application.Workbooks(1)
Select Case wkbOne.UpdateLinks
Case xlUpdateLinksAlways
MsgBox "Links will always be updated & _
for the specified workbook."
Case xlUpdateLinksNever
MsgBox "Links will never be updated & _
for the specified workbook."
Case xlUpdateLinksUserSetting
MsgBox "Links will update according & _
to user settting for the specified workbook."
End Select
End Sub