If it is the same code why can I not get it working?
What is the problem with placing them on a worksheet?