ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CellFormat is lost when using CopyFromRecordset (https://www.excelbanter.com/excel-programming/378928-cellformat-lost-when-using-copyfromrecordset.html)

lucy

CellFormat is lost when using CopyFromRecordset
 
I created an excel template with special format set for certain columns
(e.g. date format, number format, etc).
When I copy the data from SQL into this template by using CopyFromRecordset,
these formats are lost for those record rows but remained for other rows.

Is there any solution that I can keep the pre-defined format set in the
template even I use CopyFromRecordset?
Thank you very much.

Best regards,
LUCY ^.^




All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com