Creating PivotTable-reports from VB 6.0

  • Hi all,


    Creating reports in Excel is a common task and also to retrieve data from databases.


    For several reason we may decide to create a standalone reporttool in VB instead of doing it from inside Excel.


    When setting up reports with the Pivottable and particular if we want to have the option to update the table ( i e retrieve updated data from the source) we must be aware of that there exist certain limitations to use a classic ADO-approach and therefore are (still) forced to use the ODBC-approach.


    Please see Populate pivottables using ADO


    In the example early binding is used and therefore it require that we set references to the following library:


    * Microsoft Excel 9.0 or later


    What we need:
    * Microsoft Visual Basic 6.0
    * Microsoft Excel 2000 and later
    * The example database Northwind.mdb