Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a workbook for each day of the month of June. The name in each tab
will be each day of the month. I don;t want to have to rename each tab. I should be able to let excel update the tabs. HOW? -- Roaddog |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub NewWorksheet()
Dim i As Integer on error resume next For i = 2 To 31 ActiveWorkbook.Worksheets.Add ActiveSheet.Name = "Jun" & i Next i End Sub -- Don Guillett SalesAid Software "Harley" wrote in message ... I have a workbook for each day of the month of June. The name in each tab will be each day of the month. I don;t want to have to rename each tab. I should be able to let excel update the tabs. HOW? -- Roaddog |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Work backwards to not have to sort
Sub mynewsheets() on error resume next For i = 31 To 1 Step -1 On Error Resume Next Sheets.Add.Name = "Jun" & i Next i End Sub -- Don Guillett SalesAid Software "Harley" wrote in message ... I have a workbook for each day of the month of June. The name in each tab will be each day of the month. I don;t want to have to rename each tab. I should be able to let excel update the tabs. HOW? -- Roaddog |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Harley
Try this code from Chip Pearson. Sub NameSheets() 'Chip Pearson Feb 14th, 2007 Dim Ndx As Long Dim StartMonth As Variant StartMonth = Application.InputBox(Prompt:="Enter the month number.", Type:=1) If StartMonth = False Then Exit Sub End If For Ndx = 1 To ActiveWorkbook.Worksheets.Count ActiveWorkbook.Worksheets(Ndx).Name = Format(DateSerial( _ IIf(StartMonth = 1, Year(Now) + 1, Year(Now)), StartMonth, Ndx), _ "dd mmm yyyy") Next Ndx End Sub Gord Dibben MS Excel MVP On Wed, 27 Jun 2007 11:28:06 -0700, Harley wrote: I have a workbook for each day of the month of June. The name in each tab will be each day of the month. I don;t want to have to rename each tab. I should be able to let excel update the tabs. HOW? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically increment numbers in a cell when you open workbook | Excel Discussion (Misc queries) | |||
How to increment the date | Excel Discussion (Misc queries) | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Increment Page Numbers for multiple tabs in Excel | Excel Worksheet Functions | |||
Time and Date increment | Excel Discussion (Misc queries) |