Using ADO to CopyFromRecordset to another sheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using ADO to retrieve records from a database. However, the records are
automatically being stored in sheet1. How do I specify which sheet I want
the records to be stored in. I am using the following line of code to copy
from the recordset...

Range("A1").CopyFromRecordset rst

Thank you inadvance!
 
Worksheets("Sheet2").Range("A1").CopyFromRecordset oRS
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I appreciate it, thanks!

Bob Phillips said:
Worksheets("Sheet2").Range("A1").CopyFromRecordset oRS
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top