Excel Macros

I know this probably isn't the place to post this question, but I'm desprate
for help.

I need to write an Excel Macro that will execute when the spread sheet is
opened and execute a Delphi program that will return a value.  This will
basically be used for Copy protection.  We have Protection Plus
Professional, and use it all the time in our Delphi applications, but this
is an Excel spreadsheet.  It is probably possible to write a macro that
would do the same sort of thing, but I don't know ANYTHING about Excel
macro's, but if I can get it to execute a Delphi program that I write, and I
can return a value from that Delphi program some how, then we should be in

Can anyone point me in the right direction on how to get started on this
using Excel?

Thanks for any help!

-= Jesse =-