Solved

pass ADO Recordset to Excel 97 Worksheet

Posted on 1998-12-14
1
226 Views
Last Modified: 2010-05-03
I need a good method of populating data from a ADODB.Recordset into Excel97 WorkSheet.
ThanxManish
0
Comment
Question by:manish77
1 Comment
 
LVL 15

Accepted Solution

by:
Eyal earned 50 total points
ID: 1450116
Public Sub DropADORS(ByVal ADORS As ADODB.Recordset)
    Dim i As Integer, j As Integer
    Dim lCol As String, lRow As Integer
   
    For i = 0 To ADORS.RecordCount - 1
        For j = 0 To ADORS.Fields.Count - 1
            lCol = Chr(Asc("A") + j)
            Range(lCol & CStr(i + 1)).Select
            ActiveCell.FormulaR1C1 = ADORS.Fields(j).Value
        Next
        ADORS.MoveNext
    Next i
End Sub

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question