In response to my comment, you indicate: "File name, I never thought about it. At the moment, there can be anything." From bitter experience, I can tell you that dealing with thousands of files with system names is a nightmare. Now you need to fix the problem with the name.
I am also nervous about AddrToCopy = Split(Rng.Address, ",") . Rng.Address will look like this: "$ C $ 1: $ I $ 16, $ K $ 1: $ Q $ 16, $ S $ 1: $ Y $ 16, $ C18 $ I $ 33, $ K $ 18: $ Q $ 33, $ S $ 18 : $ Y $ 33, ... ". If you search on the Internet, you will find sites that tell you that Rng.Address has a maximum length of 253 characters. I do not believe that is right. In my experience, Rng.Address truncated to its full subrange. My experiments were with Excel 2003, but I found that I noticed on the Internet that this limitation was fixed in later versions of Excel. You check Rng.Address lot Rng.Address your version of Excel! I am not familiar with Jerry Bocker, although he offers an interesting solution. Sid Rout always produces great code. If there is a problem, I am sure they can fix it.
However, the real purpose of this βanswerβ is to say that I would divide this problem into three. This has many advantages and no disadvantages that I know of.
Step 1. Create a new sheet, TableSpec , with the following columns:
A Worksheet name. (If tables are spread over more than worksheet) B Range. For example: C1:I16, K1:Q16 C - I Headings from table. For example, AAPL, Open, High, Low, Close, Volume, AdjClose
Step 2. Check the TableSpec ; for example, are all tables listed? Think about the file name and add column H to contain it. I read one of your comments so that you could "AAPL" as the file name for the first table, in which case you could set H2 to "= C2". Is "AAPL" unique? You may have a serial number. There are many options you can think of before creating any files.
Step 3. The worksheet TableSpec now provides all the information needed to create your files. You can remove most of the content and test the file creation code on a couple of lines.
I hope you see the benefits of this stepwise approach, in part if your VBA is weak. Good luck.