need help with subroutine

Nick, Thanks very much. It's working now.

Greg.