Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Converting Access Database to Excel using VB


Message #1 by "Anita Datar" <anita.datar@k...> on Wed, 19 Dec 2001 09:50:21
Anita:


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.

Syntax

expression.CopyFromRecordset(Data, MaxRows, MaxColumns)

expression   Required. An expression that returns a Range object.

Data   Required Void. The Recordset object to copy into the range.

MaxRows   Optional Variant. The maximum number of records to copy onto the
worksheet. If this argument is omitted, all the records in the Recordset
object are copied.

MaxColumns   Optional Variant. The maximum number of fields to copy onto the
worksheet. If this argument is omitted, all the fields in the Recordset
object are copied.

Remarks

Copying begins at the current row of the Recordset object. After copying is
completed, the EOF property of the Recordset object is True.


Walt




  Return to Index