View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Create and name new sheet...

Right click sheet tabview codeinsert this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
mc = Target
ActiveSheet.Name = "x"
Sheets(ActiveSheet.Index + 1).Name = "xx"
ActiveSheet.Name = Format(mc, "mmm yy")
x = DateSerial(Year(mc), Month(mc) + 1, 1)
Sheets(ActiveSheet.Index + 1).Name = Format(x, "mmm yy")
End If
End Sub

--
Don Guillett
SalesAid Software

"J.W. Aldridge" wrote in message
oups.com...

I have my criteria and fields set on a worksheet. Once someone pulls
up the sheet (tab) I would like for them to enter a date in cell A1.
Based on the date entered (once it is entered), I would like to (A)
automatically update the name of the current sheet to the month & year
given in A1; (B) create another sheet (copying the entire existing
sheet - except A1) named for the next month.

Example:
if someone enters a date 6/09/2007 in A1.

Macro would:
Rename current sheet June 07
Create a copy of the current sheet.
Name the copy July 07.

Any suggestions?