Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JJ JJ is offline
external usenet poster
 
Posts: 122
Default Using ADO to CopyFromRecordset to another sheet

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!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using ADO to CopyFromRecordset to another sheet

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

HTH

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


"JJ" wrote in message
...
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!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Using ADO to CopyFromRecordset to another sheet

I appreciate it, thanks!

"Bob Phillips" wrote:

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

HTH

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


"JJ" wrote in message
...
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!





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CopyFromRecordset method poppy Excel Programming 0 September 28th 04 09:49 AM
CopyFromRecordset does nothing Hafeez Excel Programming 2 August 13th 04 07:20 PM
ADO & CopyFromRecordset performance vali Excel Programming 7 July 14th 04 09:09 AM
CopyFromRecordset does nothing E Harris Excel Programming 5 January 8th 04 04:29 PM
Copyfromrecordset Bug ? news.btx.dtag.de Excel Programming 1 August 1st 03 07:44 PM


All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"