Hello,
I'm not finished, but I'm trying to modify code that will copy data 600 rows at a time and then paste it in a new workbook each time. I will eventually try to make it name each workbook with an incremental number after the file name, or I will just let the user type the file name in an input box like I have below.
Right now I get Run Time Error 9: Subscript Out of Range on the line below:
(I've also tried using
instead of
as in the original code.)
Question: 1) What is the issue b/c I've looked at code that uses Range.Copy Destination: between workbooks:
Do I need to activate the nrenwb with nrenwb.Activate? I had to add
b/c I got the same Run Time Error 9 highlighting the same line above. As I say, I don't see why b/c won't
activate the nrenwb workbook?
2) Also, I've seen on the internet that if you have a path in the filename you can get this error, but
makes sure the variable, nrenwb, just gives the filename entered by the user with '.csv', doesn't it? Though in the locals window the Full Name does have a path.
I would appreciate any help debugging this error. Thank you.
Source: http://stackoverflow.com/questions/3...-workbook-loop
Bookmarks