Using ADO to CopyFromRecordset to another sheet

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!
 
B

Bob Phillips

Worksheets("Sheet2").Range("A1").CopyFromRecordset oRS
--

HTH

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

Guest

I appreciate it, thanks!

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

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top