fetch specific fields from recordset object

V

vikram_singh

Hi

I am using "ws.Cells(7, 6).CopyFromRecordset rstObj" to paste
retrieved fields from recordsetquery. but "CopyFromRecordset" exports
all the fields in a sequential way as they have been retrieved.

Is there any way if i could fetch specific fields from rstObj and put
them in specific columns of excel file as required.

Thanks in advance.

Vikram Singh
 
J

John Nurick

Hi Vikram,

Either open a recordset that contains just the fields you need, or else
do something along these lines:

ws.Cells(7,6).Formula = rstObj.Fields(0).Value
 
Top