but I've tried this to no effect.
I wonder if the problem is that I'm not clarifying which page I'm copying
from and/or pasting onto. As I say, the code works fine as a macro. I forgot
to mention in my previous post that the button I'm attaching it to is on the
sheet I'm copying from.