View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
StargateFanNotAtHome[_2_] StargateFanNotAtHome[_2_] is offline
external usenet poster
 
Posts: 14
Default SHEE1. Duplicate all sheets, making 2 copies of ea. / 2. Add " E"and " F" to end of tab name. / 3. Put all sheets at the very end.

Well, it's just a good thing that I've managed to learn a few tricks
because googling straight questions just doesn't help. I again googled
but on part of the syntax kindly provided for another workbook-
splitting need (something I've learned to do recently), and I came
across something that is close to doing what's needed. Hopefully
someone knows how to modify it because I have wasted so much time
already searching yet I'm not closer to getting a complete solution
<sigh. But this does help:

Googling for the syntax eventually led me he http://support.microsoft.com/kb/288402
where I found this partial result:

-------------------------------------
Sub Copier4()
Dim x As Integer

For x = 1 To ActiveWorkbook.Sheets.Count
'Loop through each of the sheets in the workbook
'by using x as the sheet index number.
ActiveWorkbook.Sheets(x).Copy _
After:=ActiveWorkbook.Sheets(ActiveWorkbook.Sheets .Count)
'Puts all copies after the last existing sheet.
Next
End Sub
-------------------------------------

This script gets me this type of result

Befo
SHEET1, SHEET2, SHEET3

After:
SHEET1, SHEET2, SHEET3, SHEET1 (2), SHEET2 (2), SHEET3 (2)

Not quite there yet, to achieve:
SHEET1, SHEET2, SHEET3, SHEET1 E, SHEET1 F, SHEET2 E, SHEET2 F, SHEET3
E, SHEET3 F

Thank you!! :oD