({{, (RefLink[EvaluationCell, paclet:ref/EvaluationCell])[] 
returns a (RefLink[CellObject, paclet:ref/CellObject]) corresponding to the cell in which this function is being evaluated.}})

OpenersNotesSection(Spacer1)Details

Evaluating (RefLink[EvaluationCell, paclet:ref/EvaluationCell]) in an Input or Code cell returns the (RefLink[CellObject, paclet:ref/CellObject]) for that cell.

Evaluating (RefLink[EvaluationCell, paclet:ref/EvaluationCell]) from within a (RefLink[Dynamic, paclet:ref/Dynamic]), (RefLink[Button, paclet:ref/Button]), or other control returns the (RefLink[CellObject, paclet:ref/CellObject]) containing the control.

If the cell has been destroyed, or if there is no corresponding cell, (RefLink[EvaluationCell, paclet:ref/EvaluationCell]) returns (RefLink[$Failed, paclet:ref/$Failed]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Return the cell being evaluated:

EvaluationCell[]

Return the cell containing a control that issues evaluation:

Button["my cell",Print[EvaluationCell[]]]

OpenersExampleSection2(Spacer1)Properties & Relations  (2)

Controls in inline cells return the innermost inline cell containing the control:

ExpressionCell[ExpressionCell[Button["my cell",Print[EvaluationCell[]]],"InnerCell"],"OuterCell"]

(RefLink[ScheduledTask, paclet:ref/ScheduledTask]) evaluations have no evaluation cell and return (RefLink[$Failed, paclet:ref/$Failed]):

SessionSubmit[ScheduledTask[NotebookWrite[InputNotebook[],Cell[ToString[EvaluationCell[]],"Output"]],{1}]];

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Cells, paclet:ref/Cells])  ▪  (RefLink[EvaluationNotebook, paclet:ref/EvaluationNotebook])  ▪  (RefLink[SelectedCells, paclet:ref/SelectedCells])  ▪  (RefLink[ParentCell, paclet:ref/ParentCell])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Low-Level Notebook Programming, paclet:guide/LowLevelNotebookProgramming])}})}})