Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
quartz wrote:
You are right. It had been awhile since I worked with ADO. I forgot that you need to specifically loop through the recordset and use ".Name" to get at the field names. I was thinking that the fields would just be there using CopyFromRecordset. I inserted the following portion of your code and it worked fine: For nCol = 1 To rs.Fields.Count Sheets("Sheet1").Cells(1, nCol).Value = rs.Fields(nCol - 1).Name Next nCol Great - glad to hear it worked for you. Thanks so much for your help. No problem! -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
return recordset | Excel Discussion (Misc queries) | |||
ActiveX CommandButton gets renamed when Sheet is cloned running Excel97 | Excel Programming | |||
UserForm problem when Worksheet is cloned | Excel Programming | |||
return all worksheet tab names and chart sheet tab names in report - an example | Excel Programming | |||
DAO query/recordset returns with field names | Excel Programming |