View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default Using an ADODB.Recordset in Excel 2007

Hi Gary....

I tried running the command below just for the heck of it on a
workbook that contains 20 worksheets or so.... this operation
took a long time and I saw the mouse pointer turn into an hourglass.
After about 4 to 5 minutes I eventually got some sort of out of
memory error message. Does the GetRows() method try to
load the entire workbook into a varriant variable??

As a side note, my query string is pretty simple (I think). It looks
like this:

szSQL = "SELECT * FROM [Sheet1$A1:A1]"

I only wanted to retrieve the contents of cell A1 from the workbook, so
I dont understand why my query takes so long and eventually runs out of
memory or something. Do you know what happened?

Thank you!


"GS" wrote in message
...
norie laid this down on his screen :
If you want to create an array from the recordset use GetRows.

arrValues = rsData.GetRows


Thanks! I completely forgot about that...

--