I am updating an excel table from an ADODB record set using the CopyFromRecordset method.
After updating the numbers are displayed as dates, where there are columns with numbers.
The workaround I have used so far is to format the columns to numbers via VBA , but this is not a good solution, since it takes longer to complete the report. I also need to write code to host a large number of tables.
Is there a quick fix? Any help is appreciated.
'Delete old data and copy the recordset to the table Me.ListObjects(tblName).DataBodyRange.ClearContents Me.Range(tblName).CopyFromRecordset rst
tblName - refers to an existing table in which data of the same format / data type is stored as the first data
source share