ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Recordset into array? (https://www.excelbanter.com/excel-programming/297473-copy-recordset-into-array.html)

Andrew_blue

Copy Recordset into array?
 
I have been pulling recordsets out of Access tables using the DAO mode
and pasting them into workbooks using the CopyFromRecordset method.

I would like to load the recordset right into an array, bu
CopyFromRecordset method requires a range object.

Can anyone suggest another method that can be used to drop a recordse
into an array

--
Message posted from http://www.ExcelForum.com


Bob Phillips[_6_]

Copy Recordset into array?
 
Andrew,

I don't use DAO, I use ADO, so this might not work, but ADO has a GetRows
method

myArray = oRS.GetRows()

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Andrew_blue " wrote in message
...
I have been pulling recordsets out of Access tables using the DAO model
and pasting them into workbooks using the CopyFromRecordset method.

I would like to load the recordset right into an array, but
CopyFromRecordset method requires a range object.

Can anyone suggest another method that can be used to drop a recordset
into an array?


---
Message posted from http://www.ExcelForum.com/




Andrew_blue[_2_]

Copy Recordset into array?
 
Thanks. That did the trick

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com