Just to add to Peter's example, in case your array's size may be unknown, you can also use .Resize with UBound and LBound...
<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN><br> <br><SPAN style="color:#00007F">Sub</SPAN> exa()<br><SPAN style="color:#00007F">Dim</SPAN> x <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, y <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, lBnd <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, i <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN>, ii <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br><SPAN style="color:#00007F">Dim</SPAN> myArray() <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br> <br> x = Evaluate("ROUND(RAND()*30,0)")<br> y = Evaluate("ROUND(RAND()*30,0)")<br> lBnd = Evaluate("ROUND(RAND()*1,0)")<br> <br> <SPAN style="color:#00007F">ReDim</SPAN> myArray(lBnd <SPAN style="color:#00007F">To</SPAN> x, lBnd <SPAN style="color:#00007F">To</SPAN> y)<br> <br> <SPAN style="color:#00007F">For</SPAN> i = lBnd <SPAN style="color:#00007F">To</SPAN> x<br> <SPAN style="color:#00007F">For</SPAN> ii = lBnd <SPAN style="color:#00007F">To</SPAN> y<br> myArray(i, ii) = i * ii<br> <SPAN style="color:#00007F">Next</SPAN><br> <SPAN style="color:#00007F">Next</SPAN><br> <br> Range("A1").Resize(UBound(myArray, 1) - <SPAN style="color:#00007F">LBound</SPAN>(myArray, 1) + 1, _<br> <SPAN style="color:#00007F">UBound</SPAN>(myArray, 2) - <SPAN style="color:#00007F">LBound</SPAN>(myArray, 2) + 1).Value = myArray<br> <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
Hope that helps,
Mark