#1: Yes
#2: Just copy the header range from the first 5 columns each time.
#1: Yes
#2: Just copy the header range from the first 5 columns each time.
Everyone who confuses correlation and causation ends up dead.
Sorry for bothering again, not familiar with Offset, what is wrong with the code? It only copies first field name, not the other four field names.Dim OutputCell as Range set outputCell = WB.Sheets("Download Sheet").Cells(2, 1) do until RecordDownloadRs.EOF WB.Sheets("Download Sheet").Range("A1:A5").Copy outputcell.offset(-1, 6).PasteSpecial Paste:=xlPasteValues outputcell.CopyFromRecordset RecordDownloadRs, 1000000, 5 set outputcell = outputcell.offset(, 6) loop
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks