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
 

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