I have two Notebooks and I call the second Notebook from the main but main Notebook's expressions continue executing. I want them to wait until the second Notebook's expressions execution is finished!
My main Notebook's code is such as:
docpath = ToFileName[{"C:", "Users"}, "MATHEMATICA"];
nbLBDxi = NotebookOpen[ToFileName[docpath, "LBDxi.nb"]];
SelectionMove[nbLBDxi, All, Notebook];
SelectionEvaluate[nbLBDxi];
NotebookClose[nbLBDxi];
- Here the main Notebook's other expressions, which I won't write for brevity, will come but I want them to wait until the above expressions' execution is over.