ButtonNotebook

ButtonNotebook[]
gives the notebook, if any, that contains the button which initiated the current evaluation.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Make a button that sets to the NotebookObject for the button's notebook:

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

After the button is clicked, the variable is assigned:

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

Use the object for further processing:

In[3]:=
Click for copyable input
Out[3]=
New in 3
New to Mathematica? Find your learning path »
Have a question? Ask support »