Originally posted by Alan The code looks fine to me though. You may of had an old variable called selection already declared as a string array and that's why it was bitching. Wise words my friend. This is why I always put everything inside an extra pair of curly brackets when noodling around in the script editor. This way you avoid declaring a bunch of global variables that can do all kinds of nasty things...