Try removing the .select line. It's not necessary and it's causing your trouble.
On 09/09/2010 17:20, Rob wrote:
> I need help writing the code that unbundles an array of worksheets.
>
> I have an application where upon completion prepares a two sheet-tab
> summary and copies these to a new workbook. The problem I have is
> when the user closes the newly created summary workbook and returns
> the the original workbook, the two sheet-tabs are still 'grouped'.
>
> Is there code to unbundle these two sheets when the user returns to
> the original workbook, and opens to the 'report' sheet-tab?
>
> Here is the code I use to take the two tabs and copy them to a new
> workbook:
>
> '**********copies to new workbook
> Sheets(Array("Summary", "report")).Select
> Sheets(Array("Summary", "report")).Copy
>
> Thanks for any help,
>
> Rob
--
Dave Peterson
|