OK, since I seem to have stumped you all so far, I thought I'd try another approach where I moved the vector command into it's own procedure. The problem I've having now is that even thoguh I've defined my variables as being global, I get errors that they are not defined. How does one define a global variable? The docs say just add the word global, but clearly there must be more to it than that since I did that and it didn't work.