Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automation from VB6

I've got a VB 6 project where I am populating a spreadsheet with data from
an ADO recordset and I've got a couple of questions.

First, is anyone aware of a way to populate the spreadsheet quickly? Right
now, I'm cycling through every record and field of the recordset, reading
the value from the recoordset, and then pasting the value into the the
corresponding spreadsheet cell. Seems to be very slow!

Second, is there any way to check to see if the user has manually closed the
Excel session before I attempt to close it in code?

Thanks for any help.

Bob


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Automation from VB6

Bob,

The CopyFromRecordset method copies the RS to a worksheet range.
--

HTH

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


"Robert A. Boudra" wrote in message
...
I've got a VB 6 project where I am populating a spreadsheet with data

from
an ADO recordset and I've got a couple of questions.

First, is anyone aware of a way to populate the spreadsheet quickly?

Right
now, I'm cycling through every record and field of the recordset, reading
the value from the recoordset, and then pasting the value into the the
corresponding spreadsheet cell. Seems to be very slow!

Second, is there any way to check to see if the user has manually closed

the
Excel session before I attempt to close it in code?

Thanks for any help.

Bob




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automation from VB6

Thanks! That works great!

Bob

"Bob Phillips" wrote in message
...
Bob,

The CopyFromRecordset method copies the RS to a worksheet range.
--

HTH

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


"Robert A. Boudra" wrote in message
...
I've got a VB 6 project where I am populating a spreadsheet with data

from
an ADO recordset and I've got a couple of questions.

First, is anyone aware of a way to populate the spreadsheet quickly?

Right
now, I'm cycling through every record and field of the recordset,

reading
the value from the recoordset, and then pasting the value into the the
corresponding spreadsheet cell. Seems to be very slow!

Second, is there any way to check to see if the user has manually closed

the
Excel session before I attempt to close it in code?

Thanks for any help.

Bob






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
Automation?? Help in automation Excel Discussion (Misc queries) 1 April 12th 06 02:10 PM
MFC Automation Macca Excel Programming 0 September 28th 04 02:52 PM
about OLE automation keyur Excel Programming 0 April 5th 04 02:54 PM
Automation Tom Excel Programming 3 December 31st 03 08:51 AM
Automation [email protected] Excel Programming 0 December 12th 03 02:52 PM


All times are GMT +1. The time now is 08:27 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"