As the title suggests; how was the file opened? What I am looking for is, is there a way to determine if a excel file was opened 1. from with in excel or 2. from a shortcut or otherwise?

What I am looking for would be a process that if a excel file is opened during log on or start up then, run this process or if the file is opened by a human (clicking on a link or from with in excel), don't run this process.

If yes, is it as easy, as lets say a single object and variable, or as complex as a full procedure?
Also just a nudge in the right direction, if it is possible, so that I can try to learn it rather than just copying someones own work.

I am using excel 2010 currently.

Thank you in advance for your advice/help.
Eric