CopyFromRecordset Excel Automation

B

Bob Barnes

Part of my Access-to-Excel Automation code includes...

objXLSheet.Range(strCellRef).CopyFromRecordset RS, 100, 4
where RS -->Set RS = CurrentDb.OpenRecordset(strSql, dbOpenSnapshot)

For some reason, this does not always work.

It will Error to...
Select Case Err
Case -2147417851 '"The server threw an exception"
' Caused when objXLSheet.Range(strCellRef).CopyFromRecordset RS

Is there alternate code to transfer the Access Recordset to EXcel via
Automation?

TIA - Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top