renaming sheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I rename a worksheet like this:
Original name + (Year-1)
I want to save some worksheets when a new year starts and use the old name
again on a new empty sheet
 
Sub RenameSheet()
x = WorksheetFunction.Text(Now(), "YYYY") - 1
ActiveSheet.Name = ActiveSheet.Name & " " & x
End Sub

This code performs this operation on the current activesheet

somethinglikeant
 
Hi Kjeldc

Try this
ActiveSheet.Name = ActiveSheet.Name & " " & Year(Date) - 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top