Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CopyFromRecordset Runtime Error '-2147319779(8002801d') 1

Status
Not open for further replies.

GarHeard

Programmer
May 3, 2005
28
US
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.
 
This isn't an "Access Other Topics" question. You should post this issue to an Excel forum.

Many of us probably use Excel and I too have run into this issue and not found a resolution. However, if I was looking to post this or search for an answer it would be in the Excel forums.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Will do. Thanks for pointing out my gaffe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top