I'm looking for a way to call a notebook within another one such that I can use the results from the called one in the calling one. To make it clearer. I have filePreCalc.nb and furtherCalc.nb. In filePreCalc.nb I do preliminary calculations which results I need in furtherCalc to do depending calculations. The reason why I do it like that is because I need the same calculation from filePreCalc.nb in different notebooks and I don't want to just have one HUGE notebook. Anyway, the way I tried to do it in furtherCalc.nb so far was:
PreNb = NotebookOpen["filePreCalc.nb"];
SelectionMove[PreNb, All, Notebook]
This actually works but the problem is that the execution in furtherCalc.nb does not wait until the filePreCalc.nb is done and keeps on going and obviously fails because there are variables missing.
Is there a better way to load another NB which automatically waits or how can I make sure the furtherCalc.nb waits untile the other one is done?
Using Pause seems to halt both files and the WaitAll didn't seem to make a difference.
Thanks for any help in advance!