+ Reply to Thread
Results 1 to 5 of 5

Build Pivot on CSV using VBA

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    London
    Posts
    23

    Build Pivot on CSV using VBA

    Hi

    I have built an MS Access front end which can export filtered data to CSV's from a database. The users then want to pivot this data using Excel..

    We are still using Office 2003 here, and typical export will be more than 65k rows..

    I now want to automate the next step of creating a new workbook file and building a pivot table within this file that connects to the CSV data..

    I am able to write code that creates an excel file, and also build a pivot on data within the workbook... However, I have not been able to find on the forums how to connect a pivot to an external datasource using VBA..

    Any ideas?

  2. #2
    Registered User
    Join Date
    07-03-2008
    Location
    London
    Posts
    23

    Re: Build Pivot on CSV using VBA

    Hi Guys

    Here is the code I have at the moment, but it keeps failing on the line '.CreatePivotTable'

    Can anyone help with this ?

    Please Login or Register  to view this content.

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Build Pivot on CSV using VBA

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    07-03-2008
    Location
    London
    Posts
    23

    Re: Build Pivot on CSV using VBA

    SOLVED !!

    Thanks Jo !!

    That works perfectly !!

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Build Pivot on CSV using VBA

    you're welcome :-)

    please don't forget to mark the thread solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1