Brad,
As I noted before, I don't believe you can make this happen through
a simple formula . You'll have to capture the details on the
"clicked" task through VBA, capture the details on the other
"clicked" task and then through code determine the differences
between the two values.
You can calculate differences between dates on the _same_ task
through functions such as ProjDateDiff() as Jim said but those
relatively simple functions will not work to compare dates between
different tasks. For help on the Project Functions, search help in
MS Project on "Project functions".
If you are interested in pursuing the possibilities through VBA and
have some skill with VBA, I suggest posting your question including
details such as -- what do you envision triggering the code, is
displaying the information in a message box sufficient, and other
details to the project developer newsgroup. Someone there can
perhaps get you started in the correct direction with the code.
Julie