Wolfram Research

ClickedNotebook

Contributed by: Bob Sandheinrich

Source Notebook

Click on a notebook to get it

ResourceFunction["ClickedNotebook"][]

gives the next selected notebook in the front end.

Details and Options

The result is a NotebookObject.
The evaluation will wait until another notebook is clicked.
Within the EvaluationNotebook clicks are ignored.
While the evaluation is happening a panel will include a button that can be used to select the EvaluationNotebook.

Examples

Basic Examples

Get a NotebookObject by clicking on the notebook:

In[1]:=
ResourceFunction["ClickedNotebook"][]
Out[1]=

Resource History