I have a small program like this:
nb1 = SelectedNotebook; nb = NotebookOpen["data 2015 - 2018.nb"]; SetSelectedNotebook[nb1];
After the 2nd command the front-end switches to notebook nb. I want the front-end to return to (or rather to stay with) notebook nb1 however but SetSelectedNotebook does not do the job. I have tried all kinds of other possibilities but thus far everything failed. Can anybody help?