Open & Copy From Multiple Text Files

  • My VBA code needs to import text files and put each one into a new worksheet. I'm currently using the following code to accomplish this:



    For some reason, it won't run in runtime mode, but it does work in break mode when I step through it. When I run it in runtime mode, I get a "Run-time error '1004': Microsoft Office Excel cannot paste the data." message displayed.



    If someone could explain why that little procedure won't work in runtime and why it does in break mode, I'd appreciate it.


    Thanks!

  • Re: Code Works In Break Mode , But Not Runtime


    Try it this way round:

  • If you wish to continue using this free service.


    Please read the This Page which you agreed to when joining. In particular the point on Thread Titles. After you have done so please CLICK HERE and Private Message Dave Hawley with your acceptance, or non-acceptance of the rules. Please also include a link to this Thread. You can copy this directly from the Address bar of your Browser. When this is done your thread will be re-opened.


    [fa]*[/fa]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!