This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

SetSelectedNotebook

SetSelectedNotebook[notebook]
makes the specified notebook be the currently selected one in the front end.
  • Setting a particular notebook to be the currently selected one typically makes it the top notebook displayed on the screen.
  • Making a notebook the currently selected one does not affect the current selection within that notebook, or within other notebooks.
Create two notebook documents:
Make the first one the selected notebook:
Create two notebook documents:
In[1]:=
Click for copyable input
Out[1]=
Make the first one the selected notebook:
In[2]:=
Click for copyable input
Out[2]=
Create a palette for selecting from two existing notebook windows:
SelectedNotebook gives you the notebook object for the selected notebook:
The evaluation notebook can be different from the currently selected notebook:
New in 3