SelectedNotebook

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 notebookoriented 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 allclose all

Basic Examples  (1)

Give the notebook object for the currently selected notebook:

In[1]:=
Click for copyable input
Out[1]=

Perform additional operations:

In[2]:=
Click for copyable input
Out[2]=

Possible Issues  (1)

See Also

SetSelectedNotebook  Notebooks  InputNotebook  EvaluationNotebook  ButtonNotebook

Tutorials

Introduced in 1996
(3.0)