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
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
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Kjeldc" <kjeldc(Remove)@tdcadsl.dk> wrote in message news:[email protected]...
> 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
Thank you, both of you. Just what I wanted ;-)
"Ron de Bruin" skrev:
> Hi Kjeldc
>
> Try this
> ActiveSheet.Name = ActiveSheet.Name & " " & Year(Date) - 1
>
>
> --
> Regards Ron de Bruin
> http://www.rondebruin.nl
>
>
> "Kjeldc" <kjeldc(Remove)@tdcadsl.dk> wrote in message news:[email protected]...
> > 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
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks