+ Reply to Thread
Results 1 to 14 of 14

Code for Merge Multi Sheets using user input

  1. #1
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Code for Merge Multi Sheets using user input

    DEF.xlsxIJK.xlsxMaster File.xlsxABC.xlsxHeello,:)

    I have used below code to merge multiple excel workbooks to one. I want to modify this code so that code will ask user to select file instead of folder path with a msg box "Browse XXX file" . This should be for 3 times as I have three files to import from diffrent locations. I also want sheet name should be on browsed workbook name.

    Please let me know if more info required.

    Please Login or Register  to view this content.
    Thanks,
    Liz:)
    Last edited by Liz_Biz; 12-19-2013 at 01:35 AM.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    Add to you code from the line :

    Please Login or Register  to view this content.
    you will end up with this

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Code for Merge Multi Sheets using user input

    Thanks for reply,

    I want to use something like below code.
    Please Login or Register  to view this content.
    This should appear 3 times as , I want to upload 3 reports in Master file.

    One more thing, Code given in my first query giving me best sheet names as Sheet1 , Sheet2 etc. but I want them on files uploaded. As attached.

  4. #4
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Code for Merge Multi Sheets using user input

    Please don't leave me in middle of the river. Help Help !!

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    Here you go. Hope we have crossed the river now.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Code for Merge Multi Sheets using user input

    We are very close to cross. Now I have confidence that I am in good hands .

    This code is superb. I have tried to do some add on in this but failed.

    Could you add msg box before select each file so that user know that what file need to select please?
    e.g. if x=1 then MsgBox "Select file ABC", vbExclamation etc

    Also, If possible master file should be separate from code file.

    Thanks in advance!!

    Liz.

  7. #7
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Code for Merge Multi Sheets using user input

    Hi perhaps you can add it to the title for the file picker window. I added this to xlbiznes's amazing code.

    Please Login or Register  to view this content.
    Thanks

  8. #8
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    @Liz_Biz,

    A quick question ?

    Every time this process happens, do we need to create a new master file and over write the existing one ?

  9. #9
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Code for Merge Multi Sheets using user input

    Quote Originally Posted by xlbiznes View Post
    @Liz_Biz,

    A quick question ?

    Every time this process happens, do we need to create a new master file and over write the existing one ?

    I want to create this and want to do some further data extraction on each sheets. Yes this will be new master file each time.

  10. #10
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    @Liz_Biz,

    here is the updated file.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Code for Merge Multi Sheets using user input

    @ xlbiznes. You are superb and have excellent VBA skills.

    @ fredlo. Thank you for looking into this.

  12. #12
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    Glad i could help and thank you for the reps.

  13. #13
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Code for Merge Multi Sheets using user input

    Hi guys,

    One thing I just noticed in this section

    Please Login or Register  to view this content.
    Its giving me an error if no file is selected ( Cancel Button pressed). I changed it to "False" instead of ""

    Please Login or Register  to view this content.
    Thanks

  14. #14
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Code for Merge Multi Sheets using user input

    @fredlo2010,

    you are right, this will take care if the user clicks cancel.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macros (fix) with criteria input from user then output with mail merge
    By Nicklebach in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2012, 10:16 AM
  2. [SOLVED] Refreshing/Recalculating Sheets based on user input or switching between sheets
    By SonOfOdin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 09:48 PM
  3. multi-user input spreadsheet, is it possible?
    By gavster in forum Excel General
    Replies: 1
    Last Post: 11-07-2011, 01:37 PM
  4. Multi User and readonly sheets
    By bugs78 in forum Excel General
    Replies: 6
    Last Post: 09-22-2011, 03:44 AM
  5. Pause macro for user input then search for user's answer across multiple sheets
    By sassy2 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-04-2009, 03:55 AM

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