BindingDeleted Event

Microsoft Office Web Components Visual Basic

BindingDeleted Event

Occurs when a new XmlDataBinding object is deleted.

Private Sub Spreadsheet_BindingDeleted (BindingId)

BindingId    Required String. The unique ID of an XmlDataBinding object. The unique BindingId    is automatically generated by the Spreadsheet component when you bind to a data retrieval service connection (.uxdc) file. Microsoft Excel also automatically generates the BindingId    when you use Excel to create a data-bound spreadsheet and later save it as an XML Spreadsheet file. In the XML Spreadsheet file, the XML fragment that contains the BindingId    looks something like the following:
<x2:Binding x2:ID="Bind_id89929" x2:LoadMode="normal" x2:Async="False">.
You can also manually assign a BindingId    value by adding the relevant XML fragment that contains data-binding details into an XML Spreadsheet file.

Example

The following example tracks the number of BindingDeleted events and displays the BindingId of the given event when it occurs.

    'global XmlDataBinding object BindingDeleted event counter.
Dim gintCounterBindingDeleted
gintCounterBindingDeleted = 0

Sub Spreadsheet1_BindingDeleted(BindingId)
    gintCounterBindingDeleted = gintCounterBindingDeleted + 1
    MsgBox "BindingDeleted and BindingId is: " & BindingId
End Sub