Colin, Thank you for the tip about changing the level of objects losing the numbering. I replaced 'set layers' with 'hide and show' in a version of my original script and it now works like a dream. :-) Barry