You are reading a single comment by @aggi and its replies. Click here to read the full conversation.
  • Are you running the macro in a separate file, or in the file you want to split?

  • I was running it in my personal workbook. Running it in the workbook that I want to split does work (but obviously isn't that practical). I'm guessing I may need to be more specific on which workbook/sheet it should be looking at.

    @chez_jay Turning off the alerts doesn't give any errors. I suspect it's down to the file location.

  • Then your problem is 'This' here.

    For Each wSheet In ThisWorkbook.Sheets

    -

    I'm guessing I may need to be more specific on which workbook/sheet it should be looking at.

    I would suggest keeping the code in a utility workbook, and Calling it from the workbook you want to split, in order to avoid this

  • I think you can save it in your personal workbook, but to run you open both, and then switch to the workbook you want to split, and run the macro from the personal workbook.

    ThisWorkbook
    

    refers to the one with the focus when you run the macro.

About

Avatar for aggi @aggi started