View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default How to save contents of cell range in an array?

Try it this way...

Dim V As Variant
V = Range("A1:C5")
MsgBox V(2, 4) ' Arguments = Row first, then Column

Just give V the scope you want it to have (that is, Dim it at a level that
gives access to whatever procedures you want to know about it).

--
Rick (MVP - Excel)


"John Uebersax" wrote in message
...
In a VBA subroutine, how can one, for example, save the contents
(numbers) of the range A1:L12 in the array x(12,12)?

And how does one declare x()?

Thanks in advance.

John Uebersax