Answers for "how to copy adodb recordset to worksheet"

0

how to copy adodb recordset to worksheet

For iCols = 0 to rs.Fields.Count - 1 
 ws.Cells(1, iCols + 1).Value = rs.Fields(iCols).Name 
Next 
ws.Range(ws.Cells(1, 1), _ 
 ws.Cells(1, rs.Fields.Count)).Font.Bold = True 
ws.Range("A2").CopyFromRecordset rs
Posted by: Guest on March-25-2021

Browse Popular Code Answers by Language