View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Helen Trim[_4_] Helen Trim[_4_] is offline
external usenet poster
 
Posts: 16
Default Worksheets - Add / Move between


This code should do what you want:

' Find how many sheets are in the workbook
Dim No_Sheets
No_Sheets = Sheets.Count

' Add a new sheet
Sheets.Add

' The new sheet is the active sheet. Move it to after the
last sheet
ActiveSheet.Move After:=Sheets(No_Sheets + 1)

HTH
Helen





-----Original Message-----
I have a workbook with 3 sheets and data on the first
sheet only.

I want to add a sheet (4) after sheet (3). Then copy

data
from sheet (1) onto sheet (4).

I then want to add a sheet (5) after sheet (4) and copy
different data from sheet (1) onto sheet (5).

I then want to add sheet (6) after sheet (5) and copy a
third set of data from sheet 1 to sheet (6).

I need to continue adding sheets after the last sheet
added until I have no more data to copy.

I'm having trouble (1) identifying the last sheet to add

a
new sheet after and (2) moving back to sheet (1).

Any help you could provide in adding sheets without
speicifying a sheet name and moving between the sheets
without specifying sheet names would be greatly
appreciated. I'm sure you can do this with a variable or
array but I'm not having much luck today. Thanks again
for the help....Mike

.