Partager via


WorkbookBase.UpdateLinks Property

Definition

Gets or sets a value that indicates a workbook's setting for updating embedded OLE links.

public:
 property Microsoft::Office::Interop::Excel::XlUpdateLinks UpdateLinks { Microsoft::Office::Interop::Excel::XlUpdateLinks get(); void set(Microsoft::Office::Interop::Excel::XlUpdateLinks value); };
public Microsoft.Office.Interop.Excel.XlUpdateLinks UpdateLinks { get; set; }
member this.UpdateLinks : Microsoft.Office.Interop.Excel.XlUpdateLinks with get, set
Public Property UpdateLinks As XlUpdateLinks

Property Value

One of the XlUpdateLinks values.

Examples

The following code example uses the UpdateLinks property to display how embedded OLE links are updated in the workbook.

This example is for a document-level customization.

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;
    }
}
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

Applies to