Jugulator
8/14/2018 - 12:43 PM

Write Recordset To Range

Sub WriteRecordsetToRange(ByRef adoRecSet As ADODB.Recordset, ByVal startCell As Range)
'Description:   Writes recordset to range
'Input:         Recordset; start cell (Range)

'   if startCell consists of more than one cell then upper-left is used
    If startCell.Cells.Count > 1 Then startCell = startCell.Cells(1)
    
    startCell.CopyFromRecordset adoRecSet

End Sub