This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / New in Version 3.0 / Notebooks  /
ButtonNotebook

  • ButtonNotebook[ ] gives the notebook, if any, that contains the button which initiated the current evaluation.
  • ButtonNotebook returns a NotebookObject.
  • If a button in a palette initiates evaluation in another notebook, then ButtonNotebook[ ] will be the palette, but EvaluationNotebook[ ] will be the other notebook.
  • If the current evaluation was not initiated by a button, then ButtonNotebook[ ] will return $Failed.
  • See the Mathematica book: Section 2.10.3.
  • See also: Notebooks, EvaluationNotebook, SelectedNotebook, InputNotebook.