PDA

View Full Version : Copy more than 1024 characters to a cell



justinferns
08-31-2011, 09:43 AM
Hi,

I'm trying to copy data from a database into an excel.
However, the problem is for certain columns in my database,
the number of characters exceeds 1024.

So on copying it to an excel, it gives me the "recordset" error.

Can someone please give me a macro of how I can copy and paste
more than 1024 characters into a cell in excel.

Thanks
Justin

mikerickson
09-01-2011, 05:45 PM
I can't reproduce this error.
Playing around with =REPT("X ",2000) in A1 and =LEN(A1) in A2,
copying, pasting, pastevalues all handle the 4000 characters.

What version of Excel are you using?

Have you looked at the DataObject, perhaps the clipboard could be parsed before it is put into cells.