i think UDT could do the trick as well
Public Type Arrays
ArrayName As string
nValues as integer 'useful for dinamically dimensioning each single ArrayValues()
ArrayValues() As variant
End Type
then you declare your UDT
ReDim MyArrays (0 To Ubound(stringData)) As Arrays' The UDT is declared
and populate it looping through stringData
and then when you need a particular array whose name is taken for a textbox you simply have to search for that name looping through "MyArrays(i).ArrayName" and, once found "theRow", you simply pass "MyArrays(theRow).ArrayValues" to subs/functions that need to sort/search/compare it with other.
I'd give it a try.
I think collection could be even more effective. I don't use them so can't give you real hints, but it appeals to me the fact that you can refer to a particular item directly by its name, thus not needing to go through a loop in order to retrieve it. I'd guess something like this
Dim MyArrays As New Collection
then you'd populate it looping through stringData
For theRow = 0 To Ubound(stringData) - 1
rowToSplit = stringData(theRow)
tempRow() = Split(rowToSplit, "|")
MyArrays.Add item := tempRow(), key := tempRow(0)
next theRow
so that when you get TheArrayName from textbox, you can directly refer to "MyArrays(TheArrayname)" array for computational purposes.
let me know if what above could really help you
bye