Mike,
A couple of problems. First, it was trying to Move the sheets to the new
location rather than copy. I don't know if this was by design or not. I
changed this part of the code to be Copy.
I ran it with the Copy change and it created the new file, but it took the
deactivate code on the pages with it. This code calls generic functions in
the source heet and thus errors in the new file.
Thoughts?
"Troubled User" wrote:
> I have a workbook with multiple different views / displays of the sheets
> within the file. Most of these pages have deactivate code on the individual
> sheets. I need to be able to generically copy the visible sheets to a new
> workbook without taking the code with them.
>
> I have tried doing this in an array and can't get it to work, so I am
> thinking that I need to move it a page at a time. I (personally) could
> probably make this work by hardcoding the move function to run based upon the
> selected view, but thought I would see if anyone had a simplier more generic
> way to select / move the visible sheets. Thanks in advance.
|