Evento ChartSheetBase.Deactivate

Si verifica quando la selezione si sposta dall'oggetto Microsoft.Office.Tools.Excel.ChartSheetBase, causando la disattivazione dell'oggetto Microsoft.Office.Tools.Excel.ChartSheetBase.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Sintassi

'Dichiarazione
Public Event Deactivate As ChartEvents_DeactivateEventHandler
public event ChartEvents_DeactivateEventHandler Deactivate

Esempi

Nell'esempio di codice riportato di seguito viene illustrato un gestore per l'evento Deactivate che visualizza una finestra di messaggio quando l'oggetto Microsoft.Office.Tools.Excel.ChartSheetBase corrente viene disattivato.

Private Sub DisplayDeactivations()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.SetSourceData(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlRowCol.xlColumns)
    Me.ChartType = Excel.XlChartType.xl3DColumn
End Sub

Sub ChartSheet1_Deactivate() Handles Me.Deactivate
    MsgBox("The chart sheet was deactivated.")
End Sub
private void DisplayDeactivations()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlRowCol.xlColumns);
    this.ChartType = Excel.XlChartType.xl3DColumn;

    this.Deactivate +=
        new Excel.ChartEvents_DeactivateEventHandler(
        ChartSheet1_Deactivate);
}

void ChartSheet1_Deactivate()
{
    MessageBox.Show("The chart sheet was deactivated.");
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

ChartSheetBase Classe

Spazio dei nomi Microsoft.Office.Tools.Excel