Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I know that I can select individual evaluatable cells and disable their Open property (through Cell > Cell Properties), but is there a simple way to toggle the Open status of all evaluatable cells?

share|improve this question
This, this and this may be helpful. – bobthechemist Jul 25 '13 at 22:44

1 Answer 1

up vote 4 down vote accepted

Something like this? (V9 and after only, because of Cells.)

toggleCellOpen[nb_: SelectedNotebook[]] :=
 (CurrentValue[#, CellOpen] = Not@CurrentValue[#, CellOpen]) & /@ 
   Select[Cells[], CurrentValue[#, Evaluatable] &]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.