Freigeben über


WorkbookBase.UpdateLinks-Eigenschaft

Ruft einen Wert ab, der die Einstellung einer Arbeitsmappe zum Aktualisieren von eingebetteten OLE-Links angibt, oder legt diesen fest.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property UpdateLinks As XlUpdateLinks
    Get
    Set
public XlUpdateLinks UpdateLinks { get; set; }

Eigenschaftswert

Typ: Microsoft.Office.Interop.Excel.XlUpdateLinks
Einer der XlUpdateLinks-Werte.

Beispiele

Im folgenden Codebeispiel wird mithilfe der UpdateLinks-Eigenschaft angezeigt, wie eingebettete OLE-Links in der Arbeitsmappe aktualisiert werden.

Dieses Beispiel bezieht sich auf eine Anpassung auf Dokumentebene.

Private Sub DisplayLinkUpdateType()
    Select Case Me.UpdateLinks
        Case Excel.XlUpdateLinks.xlUpdateLinksAlways
            MsgBox("Links will always be updated.")
        Case Excel.XlUpdateLinks.xlUpdateLinksNever
            MsgBox("Links will never be updated.")
        Case Excel.XlUpdateLinks.xlUpdateLinksUserSetting
            MsgBox("Links will update according " & _
                "to the user settting.")
    End Select
End Sub
private void DisplayLinkUpdateType()
{
    switch (this.UpdateLinks)
    {
        case Excel.XlUpdateLinks.xlUpdateLinksAlways:
            MessageBox.Show("Links will always be updated.");
            break;
        case Excel.XlUpdateLinks.xlUpdateLinksNever:
            MessageBox.Show("Links will never be updated.");
            break;
        case Excel.XlUpdateLinks.xlUpdateLinksUserSetting:
            MessageBox.Show("Links will update according " +
            "to the user settting.");
            break;
    }
}

.NET Framework-Sicherheit

Siehe auch

Referenz

WorkbookBase Klasse

Microsoft.Office.Tools.Excel-Namespace