kualjo
07-29-2010, 03:35 PM
Is there a way, once I have declared my 2-dimensional array and subscripts, to define a range of cells as the location of the array? For example, if I have
dim testarray (5, 5)
and want that 5x5 range to be cells A1:E5, how can I tell VBA to use that range as the array without having to define all 25 cells one by one? I tried something like
testarray = Range("A1:E5")
but of course this didn't work. My actual working range is going to be significantly larger, so I'm hoping for a better solution.
dim testarray (5, 5)
and want that 5x5 range to be cells A1:E5, how can I tell VBA to use that range as the array without having to define all 25 cells one by one? I tried something like
testarray = Range("A1:E5")
but of course this didn't work. My actual working range is going to be significantly larger, so I'm hoping for a better solution.