Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default renaming sheets

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default renaming sheets

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default renaming sheets

Hi Kjeldc

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Kjeldc" wrote in message ...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default renaming sheets

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" wrote in message ...
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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default renaming sheets

Helpful as always.
Thanks,
wal50

"Ron de Bruin" wrote:

Hi Kjeldc

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Kjeldc" wrote in message ...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming Sheets Accor Excel Discussion (Misc queries) 6 August 15th 08 04:43 PM
renaming sheets dinamically pimar Excel Programming 2 October 17th 05 09:21 AM
Renaming sheets Adri[_2_] Excel Programming 5 April 5th 04 10:09 PM
Renaming Sheets in a workbook Cameron MacRae Excel Programming 2 December 18th 03 11:19 PM
renaming sheets Jeremy Excel Programming 2 November 28th 03 04:46 PM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"