Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Is CopyFromRecordset a bug of Excel?


Here is the code piece...

With ThisWorkbook.Sheets("XX XX")
..Range(.Cells(4, 2), .Cells(intMaxRow + 3, _
intMaxCol + 1)).CopyFromRecordset rs
End With


Does anyone have experience of using CopyFromRecordset? I used it to
copy data from Access to Excel Worksheet. However, all those data
(with numerical ) are being changed to date. I have to mannually
format those cells before they can display correct. Thanks so much in
advance if you know what is the problem...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Similar problem

I'm having a similar issue, except for me it's numbers in the PREVIOUSLY active worksheet that are being formatted to dates.

I'm using Excel 2007.



sunzhoujia wrote:

Is CopyFromRecordset a bug of Excel?
02-Aug-07

Here is the code piece...

With ThisWorkbook.Sheets("XX XX")
..Range(.Cells(4, 2), .Cells(intMaxRow + 3, _
intMaxCol + 1)).CopyFromRecordset rs
End With


Does anyone have experience of using CopyFromRecordset? I used it to
copy data from Access to Excel Worksheet. However, all those data
(with numerical ) are being changed to date. I have to mannually
format those cells before they can display correct. Thanks so much in
advance if you know what is the problem...

Previous Posts In This Thread:

On Thursday, August 02, 2007 11:56 PM
sunzhoujia wrote:

Is CopyFromRecordset a bug of Excel?
Here is the code piece...

With ThisWorkbook.Sheets("XX XX")
..Range(.Cells(4, 2), .Cells(intMaxRow + 3, _
intMaxCol + 1)).CopyFromRecordset rs
End With


Does anyone have experience of using CopyFromRecordset? I used it to
copy data from Access to Excel Worksheet. However, all those data
(with numerical ) are being changed to date. I have to mannually
format those cells before they can display correct. Thanks so much in
advance if you know what is the problem...

EggHeadCafe - Software Developer Portal of Choice
..NET 2.0 Application Restart When it Goes "KABOOM"
http://www.eggheadcafe.com/tutorials...tion-rest.aspx
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Similar problem


The problem isn't with copyfromrecordset. the problem is a general
issue with excel. Excel automatically updates data while the data is
placed in the worksheet. The problem occurs more often when a cell is
formated as general then other formats. Excel isn't looking at the
format of hte database.

You will see a similar problem in VBA depending if you use and equal
sign to put data into the worksheet verses using copy. the copy method
will copy the formating of the source cell to the destination cell but
using an equal sign will use the destination format.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149668

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
Format data in Excel after using copyfromrecordset jj Excel Discussion (Misc queries) 2 June 13th 07 06:48 AM
MFC - CopyFromRecordset - Copy data to Excel Jen Leonard Excel Programming 0 June 7th 06 03:01 AM
copyfromrecordset fails after upgrade to XP and Excel 2003 [email protected] Excel Programming 0 April 28th 05 06:06 PM
Excel VBA - CopyFromRecordset (ADO) Problems with 107000 records Philip Excel Programming 8 March 24th 05 08:53 AM
Excel 2003 - 'CopyFromRecordset' Error Chris Wiley Excel Programming 2 October 2nd 04 05:42 AM


All times are GMT +1. The time now is 09:23 PM.

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"