View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Making for adding and naming a new sheet

'---------------------------------------------------
Sub CreateNextMonthSheet()
Dim dDate As Date 'Activesheet date

dDate = DateValue("1 " & _
Right(ActiveSheet.Name, Len(ActiveSheet.Name) - 10))
ActiveSheet.Copy after:=ActiveSheet
ActiveSheet.Name = "Inventory " & _
Format(DateSerial(Year(dDate), Month(dDate) + 1, Day(dDate)), "mmmm")

End Sub
'------------------------------------------------

Cheers,
--
AP

"michaelberrier" a écrit dans le message de news:
...
Ok, AP..last thing and I'll be out of your hair.

Is there anyway to date the successive sheets based on the month of the
previous sheet. In other words, if the macro creates "Inventory June",
then the macro fired from that sheet will make "Inventory July" and so
forth?

Thank you so much for your time.