Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hello All..
I am trying to get this thing to function..without much success. What it needs to do is.. Only insert one new sheet on request (called from another macro/userform) Check if that sheet already exists, then insert the next one from the array where the sheet names are stored. Here's the code so far..(It just spits out all the sheets in the array in one go) Sub Newsheets() Dim nLast As Long Dim i As Long Dim NewSheet Dim n As Long Dim a As Long NewSheet = Array("31-60", "61-90", "91-120", "121-150") For n = LBound(NewSheet) To UBound(NewSheet) nLast = Sheets.Count For i = 1 To ActiveWindow.SelectedSheets.Count Sheets.Add _ After:=Sheets(Sheets.Count), _ Type:= _ "C:\Documents and Settings\Admin\Application Data\Microsoft\Templates\New Sheet.XLT" Sheets("sheet1").Name = NewSheet(n) Count = 1 Sheets(nLast + 1).Select Next i Add_Numbers Next n End Sub Any thoughts on where to go from here are indeed welcomed. Regards Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
indirect function in different worksheets, losing my hair! | Excel Discussion (Misc queries) | |||
How to protect and unprotect 30 worksheets in a file every month . | Excel Worksheet Functions | |||
Protect/unprotect all worksheets | Excel Worksheet Functions | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) | |||
Assigning Cells in worksheets to other data in other worksheets. | Excel Discussion (Misc queries) |