I d/l date from the main system into Excel. Do some slice and dicing and then create a series of new worksheets. Into each of these new sheets I also need to include some macro code. So based on examples I found on the board here I tried.
Where the text file "Importcode.txt" contains the macro code and fn is the name of the worksheet that was just created and closed.
The error I get is "subscript out of range" in the blue statement above.
I want to use the import because the macro could be different at various locations. The separate file will make maintenance easier.
Thanks
Bookmarks