Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default I want to rename my worksheet tabs...

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default I want to rename my worksheet tabs...

Darrell

Try the below macro

Sub CreateMonthSheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "1/Jan/2009"
ActiveWorkbook.Sheets.Add Count:=(25 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dr. Darrell" wrote:

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default I want to rename my worksheet tabs...

Forgot to mention that the macro will insert 24 sheets and name from Jan-09
to Dec-10.

If you are new to macros set the Security level to low/medium in
(Tools|Macro|Security). From workbook launch VBE using short-key Alt+F11.
From menu 'Insert' a module and paste the below code. Save. Get back to
Workbook. Run macro from Tools|Macro|Run <selected macro()

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Darrell

Try the below macro

Sub CreateMonthSheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "1/Jan/2009"
ActiveWorkbook.Sheets.Add Count:=(25 - ActiveWorkbook.Sheets.Count)
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dr. Darrell" wrote:

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default I want to rename my worksheet tabs...

Jacob:

I have quite a few functions in the worksheets which are linked to several
workbooks, so I would prefer to rename the existing tabs if possible.

"Dr. Darrell" wrote:

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default I want to rename my worksheet tabs...

Try the below

Sub CreateMonthSheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "1/Jan/2009"
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dr. Darrell" wrote:

Jacob:

I have quite a few functions in the worksheets which are linked to several
workbooks, so I would prefer to rename the existing tabs if possible.

"Dr. Darrell" wrote:

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 74
Default I want to rename my worksheet tabs...

Thank You; this seems to do the trick.

"Jacob Skaria" wrote:

Try the below

Sub CreateMonthSheets()
Dim intTemp
Dim dtTemp As Date
dtTemp = "1/Jan/2009"
For intTemp = 2 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = _
Format(DateAdd("m", (intTemp - 2), dtTemp), "mmm-yy")
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Dr. Darrell" wrote:

Jacob:

I have quite a few functions in the worksheets which are linked to several
workbooks, so I would prefer to rename the existing tabs if possible.

"Dr. Darrell" wrote:

I want to rename my worksheet tabs to be numbered: Jan-09, Feb-09,
Mar-09...Nov-10, Dec-10

I would like to start the numbering at the second Tab (The first Tab is
"Summary".

Can I place a line of code to perform this?

I am modifying 20 workbooks, so after re-typing the tabs on a couple it
seems there might be an easier way.

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
rename excel tabs months for year without doing it individually Vicky P Excel Worksheet Functions 4 October 8th 08 07:09 PM
rename sheet tabs in excel blantyreson Excel Discussion (Misc queries) 2 August 22nd 07 06:31 PM
rename tabs May Excel Discussion (Misc queries) 5 February 14th 07 11:45 PM
Rename all existing worksheet tabs MikeM Excel Discussion (Misc queries) 14 October 20th 06 03:29 AM
RENAME SHEET TABS AOYUMATICALLY RENAME SHEET TAB NAMES VIA MACRO'S Excel Discussion (Misc queries) 3 February 3rd 05 01:06 PM


All times are GMT +1. The time now is 05:47 PM.

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

About Us

"It's about Microsoft Excel"