Export (0) Print
Expand All
Expand Minimize

ActionClickEventHandler Delegate

Represents the method that will handle the Click event of an Action.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public delegate void ActionClickEventHandler (
	Object sender,
	ActionEventArgs e
)

Parameters

sender

The source of the event.

e

An ActionEventArgs that contains the event data.

When you create an ActionClickEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about delegates, see Events and Delegates.

The following code example demonstrates a handler for the Click event. The event handler displays the address of the cell that contains the recognized smart tag term or expression. This code example is part of a larger example provided for the Action class.

void DisplayAddress_Click(object sender, 
    Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
    string smartTagAddress = e.Range.get_Address(missing,
        missing, Excel.XlReferenceStyle.xlA1, missing, missing);
    MessageBox.Show("The recognized text '" + e.Text +
        "' is at range " + smartTagAddress);
}

Show:
© 2014 Microsoft