Thanks guys, I appreciate it. I'll just attach the whole thing and you'll see there's not much more to it than the code I pasted. I suspect that it's not even using two lines, but only one for both opens, since it loses the previous line as soon as ...