I am trying to add the current year as part of the worksheet name for a new worksheet. I can't seem to get my code to add the year to the end of the file name. I want the code to end up with new sheet for workbook to be "File_Name_2018". Here is what I have so far.
Dim CYear As String
CYear = Year(Now)
If Range("AJ5").Value <= 0 Then Range("AJ5") = CYear 'I was using this part to check that I was getting the right year (2018).
Range("AJ6") = "File_Name_" & CYear 'I was using this cell to display the string to check for the above result when combined.
All help is greatly appreciated!
Bookmarks