Any time that you have an error like this you should add your own debugging code to determine the value being passed to the various arrays being used on or near the line that has the problem. It will often lead you to the answer. If you're going to be posting in the Scripting Help section, this should be your first step unless it is difficult to reproduce.