I have a Mathematica Notebook with a function that i would like to be able to access from another Notebook without having to have the first Notebook open. The functions calls other functions in the same notebook so all code in that nootebook would have to be compiled. Thanks for any help in advance!!
Note that there is another, newer, way to store definitions that may suit your purposes: to store then as local objects (or even as cloud objects), then retrieve them when needed. I'll illustrate with a very simple example and just for local objects.
In a notebook session, evaluate successively:
def = "func[x_]:=Exp[-x]Sin[x]" LocalObject["file:///Users/myname/Desktop/funcdef"] Put[def, %]
Then at any subsequent Mathematica session, in any notebook, evaluate...
...and see that it works: