View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Zych Tim Zych is offline
external usenet poster
 
Posts: 389
Default How to include field name in CopyFromRecordset

Can't.

Loop through the fields and stick the names above the recordset.

Dim nFieldIndex as Long
For nFieldIndex = 0 to rs.Fields.Count - 1
Cells(1, 1+nFieldIndex).Value = rs.Fields(nFieldIndex ).Name
Next


--
Tim Zych
SF, CA

"clara" wrote in message
...
Hi all,

When I dump the record onto a sheet, I hope to include the fields' name
from
the recordset. How can I do it?

Shu Zi Yang
--
thank you so much for your help