Hello.
I've written a code to create a duplicate of a pre-made sheet into the same workbook. It worked for a while but now it's giving me runtime error 1004 saying that "Copy method of Worksheet class failed". I'm not sure how to remedy this.
My code is this:
![]()
Sub Create_New_Sheet() Dim NewName As String Sheets("Year Template").Copy after:=Worksheets("Year Template") NewName = InputBox("Input year of data. Warning! Ensure copied sheets contain current year's data!") ActiveSheet.Name = NewName
Bookmarks