Where did you place the code? Should be in a Standard Module.