Professor Excel

Comments 6

  1. Daniel Wise

    Hi

    I want a routine to compare and merge some workbook into one or only merge some workbooks into one. I don’t want a only copy a sheet, no…. I want to MERGE copies of one workbook into one.

    I hope you can help me

    Thanks

  2. Sharyn

    Hi. I used method 4 to merge numerous excel files into one workbook.

    After each file it gives me a message that says “The name ‘NvsInstanceHook’ already exists. Click Yes to use that version of the name or click No to rename the version of ‘NvsInstanceHook’ you’re moving or copying”
    I click yes. Then it asks me if I want to save or not save the file. I click not save,

    How do I get the script to automate answering both those prompts so I don’t need to manually select?

    Also, how do I save this script so I can keep using it over and over again?

  3. Jacqui

    Hi

    I used the VBA method which worked like a charm except I had to click “save” after every file was processed. Is there any way to include that in the module?

    Thanks!

    Jacqui

    • Henrik Schiffner

      Hi Jacqui,
      Please replace this line:

      sourceWorkbook.Close

      by these lines:

      Application.DisplayAlerts = False
      sourceWorkbook.Close
      Application.DisplayAlerts = True

      This should avoid the error messages. But please make sure that your work is saved…

  4. Brent R.

    “Method 5: Automatically merge workbooks
    The third way is probably most convenient:”

    Is that a “Monty Python & the Holy Grail” reference? 😀

    • Henrik Schiffner

      Haven’t seen it actually. But I corrected the mistake… it’s the fifth way 😉

Leave a comment