Udostępnij za pośrednictwem


Workbook.UpdateLinks Property (2007 System)

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

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

Syntax

'Declaration
Public Property UpdateLinks As XlUpdateLinks
'Usage
Dim instance As Workbook 
Dim value As XlUpdateLinks 

value = instance.UpdateLinks

instance.UpdateLinks = value
public XlUpdateLinks UpdateLinks { get; set; }
public:
property XlUpdateLinks UpdateLinks {
    XlUpdateLinks get ();
    void set (XlUpdateLinks value);
}
public function get UpdateLinks () : XlUpdateLinks 
public function set UpdateLinks (value : XlUpdateLinks)

Property Value

Type: XlUpdateLinks
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 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 Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace