+ Reply to Thread
Results 1 to 7 of 7

Copy a range from closed workbooks (ADO)

  1. #1
    Registered User
    Join Date
    09-17-2010
    Location
    Southern California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Copy a range from closed workbooks (ADO)

    First off, thank you in advance for any help. I love this site:

    I am trying to pull data from a few hundred workbooks in a single folder. Each workbook has a sheet labeled "Output" with normalized data in the range A2:KB2. the Header row is A1:KB1.

    I am working with a ADO Macro which I obtained from the site below:
    http://www.rondebruin.nl/ado.htm

    Everything is working fantastic with one exception. The Data table does not pull for all columns. Instead of pulling the range A2:KB2 it pulls A2:IU2. The souce code I am using is below:


    Please Login or Register  to view this content.
    Last edited by pike; 09-18-2010 at 05:06 AM. Reason: code tags for newbie pm warning

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copy a range from closed workbooks (ADO)

    Please Login or Register  to view this content.
    Adapt the path (c01) to your specific situation.



  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Copy a range from closed workbooks (ADO)

    I wonder if there is an issue with the maximum number of fields Ado can handle.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    09-17-2010
    Location
    Southern California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy a range from closed workbooks (ADO)

    Quote Originally Posted by Andy Pope View Post
    I wonder if there is an issue with the maximum number of fields Ado can handle.
    From what I have been able to find ADO can handle thousands of columns.

  5. #5
    Registered User
    Join Date
    09-17-2010
    Location
    Southern California
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Copy a range from closed workbooks (ADO)

    Quote Originally Posted by snb View Post
    Please Login or Register  to view this content.
    Adapt the path (c01) to your specific situation.

    Thank you for the response...but I don't have enough experience to make use of what you are saying. Do I change the current code?

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Copy a range from closed workbooks (ADO)

    Perhaps I should have said it's a limit of the MS Jet provider

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Copy a range from closed workbooks (ADO)

    If your folder is: S:\Postsales\approvals this code should work without any adaptation.

    Please Login or Register  to view this content.

+ 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