gives the currently selected notebook in the front end.


SelectedNotebook
gives the currently selected notebook in the front end.
Details

- SelectedNotebook returns a NotebookObject.
- The currently selected notebook will normally have its title bar highlighted.
- The currently selected notebook is the one to which notebook‐oriented menu commands in the front end will be directed. Textual commands, however, are directed to the input notebook.
- A palette window can be a currently selected notebook but cannot normally be an input notebook.
Examples
open all close allBasic Examples (1)
Possible Issues (1)
Both programmed operations and user interactions can change the selected SelectedNotebook:
See Also
SetSelectedNotebook Notebooks InputNotebook EvaluationNotebook ButtonNotebook
Function Repository: ClickedNotebook
Tech Notes
Related Guides
History
Introduced in 1996 (3.0)
Text
Wolfram Research (1996), SelectedNotebook, Wolfram Language function, https://reference.wolfram.com/language/ref/SelectedNotebook.html.
CMS
Wolfram Language. 1996. "SelectedNotebook." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SelectedNotebook.html.
APA
Wolfram Language. (1996). SelectedNotebook. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SelectedNotebook.html
BibTeX
@misc{reference.wolfram_2025_selectednotebook, author="Wolfram Research", title="{SelectedNotebook}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/SelectedNotebook.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_selectednotebook, organization={Wolfram Research}, title={SelectedNotebook}, year={1996}, url={https://reference.wolfram.com/language/ref/SelectedNotebook.html}, note=[Accessed: 08-August-2025]}