How can I programatically open and close cells in a notebook? There are so many commands I am not sure how to go about this.
Suppose I have 3 cells with text and a fourth cell that contains a button that will close (say) the second cell and another button to reopen it.
I can figure out the rest given this clue.
Take a look at how the following code works to get some insight into how to handle a problem like this using CellTags. I am interpreting you question about opening and closeing a cell as wanting to hide the cell rather than in terms of opening and closing CellGroups. But the latter can be handled along similar lines.