XmlMappedRange.Change Event (2007 System)

Occurs when something changes in the XmlMappedRange control.

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

public event DocEvents_ChangeEventHandler Change

This event is raised if the XmlMappedRange control is changed by either a programmatic modification or user interaction. This event does not occur when the XmlMappedRange control changes during a recalculation.

The following code demonstrates a handler for the Change event that displays the address of the XmlMappedRange that changed. This code example assumes that the current worksheet contains an XmlMappedRange named CustomerLastNameCell.

private void XmlMappedRange_Change()
{
    this.CustomerLastNameCell.Change += 
        new Excel.DocEvents_ChangeEventHandler(
        CustomerLastNameCell_Change);
}

void CustomerLastNameCell_Change(Excel.Range Target)
{
    string changedRange = Target.get_Address(missing, missing,
        Excel.XlReferenceStyle.xlA1, missing, missing);

    MessageBox.Show("The value of " + this.Name + ":" +
        changedRange + " has been changed.");
}

Community Additions

ADD
Show: