I want to write a function/sub which fills an array of set size with strings and returns the array. I don&#039;t particularly care whether the array size is defined inside the "function" or outside it. This was one of my attempts at it:<BR>&#060;%<BR>dim arrMyStrings(20)<BR><BR>sub doSomething (ByRef arrStrings)<BR> dim i<BR> i = 0<BR> arrStrings(i) = "bla"<BR>end sub<BR><BR>doSomething arrMyStrings<BR>%&#062;<BR><BR>When it hits the "arrStrings(i) = ...", the script dies with the following response - <BR><BR>Microsoft VBScript runtime error &#039;800a000d&#039; <BR>Type mismatch: &#039;[undefined]&#039; <BR><BR>Why is this happening?<BR>What can I do about it?<BR>If I&#039;m doing something completely boneheaded, how would I go about obtaining an array from a function/sub and how would I go about using it later?<BR><BR>Thanks in advance.