Excel seems to be confusing the days and the months from what I think is very straight forward input. When you click on "new sheet" it should create a new sheet with the next montn in cell A3 (Febuary 2010) but the date it puts in is 02/01/2010. I can't find a workaround.
i can not read your code, but try formatting the date to suit sht.name = format(range("a3"), "mmmm yyyy")
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Why do you need the day part anyway if you don't want to show it?
Set the formatting of that cell to TEXT so that it doesn't apply extra intelligence and then do:
vb Code:
SheetDate = DateSerial(2010, 2, 1)
[A3].Value = Format(SheetDate,"MMMM yyyy")
Pradeep, Microsoft MVP (Visual Basic) Please appreciate posts that have helped you by clicking icon on the left of the post.
"A problem well stated is a problem half solved." — Charles F. Kettering
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete