For example, say I create a notebook with a cell

a = 5 + 2

and then I close Mathematica, reopen the notebook, enter a new cell

b = a*2

and evaluate the new cell with Shift+Enter. I want the output to be 14 without evaluating to evaluate the first cell. Is this posible?

I want this because i'm making a Stylesheet Creator and i have ColorSelectors, inputfield, etc and i want to have dafault values.

  • $\begingroup$ @Jens but that is for execute and evaluate an external notebook... i want a way to open manually a notebook and autoevaluate cells in the same notebook EDIT: my bad yes it's duplicated u.u $\endgroup$
    – Gonzalo
    May 28, 2014 at 21:14
  • $\begingroup$ Notwithstanding that you say the link answers your question, the framing of the question actually suggests that you need variables localized in the notebook. I'd suggest you read the docs on TaggingRules. IMO it would be easier to do what you want that way. $\endgroup$ May 28, 2014 at 22:57


Browse other questions tagged or ask your own question.