Share via


Excel) (Workbook.UpdateLinks 屬性

會傳回或設定 XlUpdateLink 常數,指出活頁簿更新內嵌 OLE 連結的設定。 讀取/寫入。

語法

運算式UpdateLinks

表達 代表 Workbook 物件的 變數。

範例

在本範例中,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

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應