ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheets - Add / Move between (https://www.excelbanter.com/excel-programming/288720-worksheets-add-move-between.html)

mike

Worksheets - Add / Move between
 
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

mudraker[_120_]

Worksheets - Add / Move between
 
ActiveWorkbook.Sheets.Add after:=Worksheets(Worksheets.Count)

Worksheets(1).Selec

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com