Action.Click Event (2007 System)
Occurs when the action in the smart tag menu is clicked.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Syntax
'Declaration
Public Event Click As ActionClickEventHandler
'Usage
Dim instance As Action
Dim handler As ActionClickEventHandler
AddHandler instance.Click, handler
public event ActionClickEventHandler Click
public:
event ActionClickEventHandler^ Click {
void add (ActionClickEventHandler^ value);
void remove (ActionClickEventHandler^ value);
}
JScript does not support events.
Examples
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.
This example is for a document-level customization.
Private Sub DisplayAddress_Click(ByVal sender As Object, _
ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) _
Handles DisplayAddress.Click
Dim smartTagAddress As String = e.Range.Address( _
ReferenceStyle:=Excel.XlReferenceStyle.xlA1)
MsgBox("The recognized text '" & e.Text & _
"' is at range " & smartTagAddress)
End Sub
void DisplayAddress_Click(object sender,
Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
string smartTagAddress = e.Range.get_Address(missing,
missing, Excel.XlReferenceStyle.xlA1, missing, missing);
System.Windows.Forms.MessageBox.Show("The recognized text '" + e.Text +
"' is at range " + smartTagAddress);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.