Hi Mark,
Thanks for all your help.
When I copied the code into my Macro I found the problem Norman identified.
Anyway as I said before it worked but copied each sheet to a seperate
workbook. I have now changed tack and copied ALL the sheets to a new
workbook I then use your example to read through the sheets and delete the
ones I don't want.
Thanks heaps for pointing me in a different direction, I was so focused on
copying only the sheets I wanted and trying to resolve my error that I didn't
look at other options.
exceluserforeman wrote:
Hello Norman,
Yes, I think you are right. I only tested it when the two unwanted sheets
were at the end of the collection. Thanks for making that point. I think it
would be best to put in a blank Else statement so that the macro has an
option if the statement is false.
- -mark
Hi Exceluserforeman,
[quoted text clipped - 93 lines]
Sheets(Array(worksheet_to_copy)).Select
Sheets(Array(worksheet_to_copy)).Copy
--
Message posted via
http://www.officekb.com