CopyFromRecordset of Excel VBA Range method can be used if you want to copy the data from a record set. When we deal with data bases using ADO or DAO, we often retrieve the data using select statement to a record set, and we process to an array or we paste into a range. CopyFromRecordset method of Excel Range object will help to copy the data from record set to a specific range in the Excel using VBA.
VBA CopyFromRecordset Range in Excel- Syntax
Here is the syntax of the CopyFromRecordset method of range object.
Range(“YourRange”).CopyFromRecordset(Data As Unknown,