Sub NewCalendar()
' Make new calendar
On Error GoTo ProcError
Dim ShtName$
Sheets(2).Copy After:=Sheets(1)
ShtName = Range("H1").Value + 1
Sheets(2).Name = ShtName
Range("H1").Value = ShtName
ProcError:
Exit Sub
End Sub
This works just fine when I create first copy, but after that it's type mismatch (error 13)
EDIT: As this is my first post here, I forgot to explain what I want to do here.
I want to create a new sheet with a name "24.7.2013" if the previous date was "23.7.2013" and so on.
Every H11 Cell in every sheet contains a date. I am setting the variable ShtName a value (the date from newest sheet cell H11 + 1).
Then I copy the newest sheet and rename it with ShtName. Sorry if this seems messy. It's actually quite simple, I'm just not so good at explaining stuff.
Bookmarks