I am not very familiar with what you are trying to do, but I would
probably start off my code with getting a count of the names, and using
that as a variable in the declaration of the array.
Something like:
Dim intName1 as Integer
Dim intName2 as Integer
- get a count of selected cells.
intName1 = ActiveWorkbook.ActiveCells.Count
intName2 = ActiveWorkbook.ActiveRows.Count
REDIM PRESERVE TEST(intName1,intName2) AS STRING
Please know that this is just off the top of my head to give you an idea
of how to figure out how many items are in a list. You are going to
need to figure out how to get the selected Columns and Rows counted to
populate the variables. (Unless Ray can step in and provide a better
answer!