+ Reply to Thread
Results 1 to 11 of 11

Code will only consolidate from one file and will get an error right after

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Code will only consolidate from one file and will get an error right after

    Hi,

    I am currently working on this project that will consolidate databases from multiple files. The code is not mine. I got this from one of the experts here. Unfortunately, I could not recall his/her name and I am unable to view that thread again(thanks to our company's deep freeze). It will only consolidate from Logger v2.1 and will get an error when getting the information from Logger v3.1. Can you please tell me what I did wrong? I am not good with coding and I just started learning MS Excel VB.

    Another minor issue is that when I enter data into the database using the Logger v1.1, if I add a data using Posting ID and then add another data using Posting ID or Order ID, the previous data gets overwritten. Can you please help me with the code?

    Please Login or Register  to view this content.
    I attached my work. Thank you so much.
    Attached Files Attached Files
    Last edited by jednified; 05-19-2013 at 02:06 PM. Reason: Use CODE tags, not QUOTE tags. ;) Thanks.

  2. #2
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code will only consolidate from one file and will get an error right after

    My bad. I used the wrong tags. Thanks.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Code will only consolidate from one file and will get an error right after

    Hi jednified

    Does Logger v1.1.xlsm not get consolidated?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code will only consolidate from one file and will get an error right after

    I haven't added the Logger v1.1.xlsm to the code which consolidates data. It only consolidates the other two.

    Thanks, Jas.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Code will only consolidate from one file and will get an error right after

    Hi jednified

    Try this Code...appears to do as you require...
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code will only consolidate from one file and will get an error right after

    Thank you so much, jaslake. May I ask where did I make a mistake?

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Code will only consolidate from one file and will get an error right after

    Hi jednified

    Compare this line of Code
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    Other than that, I modified the Code to eliminate all the selecting.

  8. #8
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code will only consolidate from one file and will get an error right after

    Thank you so much, jaslake. Works like a charm now.

    I can also create a button in excel to start consolidating the files, right?

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Code will only consolidate from one file and will get an error right after

    Hi jednified

    Yes, I should think you can do this
    I can also create a button in excel to start consolidating the files
    Assign the Code to the Button...

  10. #10
    Registered User
    Join Date
    04-12-2013
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Code will only consolidate from one file and will get an error right after

    Thank you so much, Jays. Thank you for solving my problem.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Code will only consolidate from one file and will get an error right after

    You're welcome...glad I could help. Thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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