Propriedade WorkbookBase.UpdateLinks

Obtém ou define um valor que indica a configuração da pasta de trabalho para a atualização de vínculos OLE incorporados.

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

Sintaxe

'Declaração
Public Property UpdateLinks As XlUpdateLinks
    Get
    Set
public XlUpdateLinks UpdateLinks { get; set; }

Valor de propriedade

Tipo: Microsoft.Office.Interop.Excel.XlUpdateLinks
Dentre as XlUpdateLinks valores.

Exemplos

O seguinte exemplo de código usa a UpdateLinks propriedade para exibir os vínculos OLE incorporados como são atualizados na pasta de trabalho.

Este exemplo é para uma personalização em nível de documento.

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

Segurança do .NET Framework

Consulte também

Referência

WorkbookBase Classe

Namespace Microsoft.Office.Tools.Excel