Originally posted by Idephix
Not true.

If TempDomainQuery as no space, the you will have an single element in your array (the same value than TempDomainQuery)
If TempDomainQuery is an empty string (value = ""), then the Split function will return an empty array
That's correct.

but it's that empty string that's causing the subscript error - on error resume next seems to get round that niccely!

Simon