Don't mean to slam you with RTFF, but there is a lot of good information there in a little space.

Start with this one:

Topic: How to use UDFs
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.