I noticed the following on an MSDN website:
CopyFromRecordset Method
Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range. If the Recordset object contains fields with OLE objects in them, this method fails.
I have an Access application and after executing a stored procedure and creating a recordset, I tried to use the CopyRecordSet as follows:
With objWS
.Range("A2").CopyFromRecordset rstQueryFS
.Cells.EntireColumn.AutoFit
End With
I get a run time error as follows:
Run-time error '-2147319779(8002801d')
method 'CopyFromRecordset'
of object 'Range' failed
Do you possibly know why I get this error? I am using Excel 2002. I don't think have any OLE objects types or array data. I'm just running a stored procedure (querying
a couple of tables).
I am trying to find a way to speed up the processing
of sending a recordset to an Excel file which is the format in which the user wants the output.
CopyFromRecordset Method
Copies the contents of an ADO or DAO Recordset object onto a worksheet, beginning at the upper-left corner of the specified range. If the Recordset object contains fields with OLE objects in them, this method fails.
I have an Access application and after executing a stored procedure and creating a recordset, I tried to use the CopyRecordSet as follows:
With objWS
.Range("A2").CopyFromRecordset rstQueryFS
.Cells.EntireColumn.AutoFit
End With
I get a run time error as follows:
Run-time error '-2147319779(8002801d')
method 'CopyFromRecordset'
of object 'Range' failed
Do you possibly know why I get this error? I am using Excel 2002. I don't think have any OLE objects types or array data. I'm just running a stored procedure (querying
a couple of tables).
I am trying to find a way to speed up the processing
of sending a recordset to an Excel file which is the format in which the user wants the output.