Is it possible to define an array with 2 dimensions. Then later redefine with 3 dimensions?

For example:

Dim test(5,10)
Redim test(5,10,15)

Clearly this results in an error, but you can get the idea of what I want to be doing.

To take this a step further, what I want to be able to do is to take some input from the user, they click a button, and based on the number of dimensions they feed in, I want to create that number of dimensions. My simple solution is to limit the number of creations to let's say 5 dimensions and just have a 5-piece SELECT-CASE chunk of code. However I always like to make things that don't have limits like that. Any thoughts?