Range.CopyFromRecordset (Excel)
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.
Copying begins at the current row of the Recordset object. After copying is completed, the EOF property of the Recordset object is True.
CopyFromRecordset (Data, MaxRows, MaxColumns)
Dim lngCopyFromRecordset As Long
lngCopyFromRecordset = ActiveCell.CopyFromRecordset(Data:=)
Arguments
The following argument is required
Data (Recordset) - The Recordset object to copy into the range.
Optional arguments
The following arguments are optional
MaxRows - 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 - The maximum number of fields to copy onto the worksheet. If this argument is omitted, all the fields in the Recordset object are copied