#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Tabs

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Tabs

Hi,

You could rune this simple macro. Right click any sheet tab, view code and
paste the code in.

Sub Name_Sheets()
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next
End Sub

Mike

"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Tabs

Please create 12 sheets or set the number of default sheets to 12 before
running this maco.

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


"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Tabs

Great!! that saves me a lot of time! is there any way 12 sheets can
automativally be inserted into a workbook as oppose to 3? that way i dont
even have to insert the 12 tabs!!
--
Lois


"Mike H" wrote:

Hi,

You could rune this simple macro. Right click any sheet tab, view code and
paste the code in.

Sub Name_Sheets()
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next
End Sub

Mike

"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Tabs

Hi,

You could add the sheets with code but you can also do it using but that
will affect all workbooks you open. Try this modified code

Sub Name_Sheets()
numsheets = Worksheets.Count
For i = 1 To 12
If i numsheets Then
Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name = MonthName(i)
Else
Sheets(i).Name = MonthName(i)
End If
Next
End Sub

Mike

"Jacob Skaria" wrote:

Please create 12 sheets or set the number of default sheets to 12 before
running this maco.

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


"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Tabs

Sub CreateMonthSheets()
Dim intTemp
ActiveWorkbook.Sheets.Add Count:=(12 - ActiveWorkbook.Sheets.Count)
For intTemp = 1 To ActiveWorkbook.Sheets.Count
ActiveWorkbook.Sheets(intTemp).Name = MonthName(intTemp)
Next
End Sub

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


"Lois" wrote:

Great!! that saves me a lot of time! is there any way 12 sheets can
automativally be inserted into a workbook as oppose to 3? that way i dont
even have to insert the 12 tabs!!
--
Lois


"Mike H" wrote:

Hi,

You could rune this simple macro. Right click any sheet tab, view code and
paste the code in.

Sub Name_Sheets()
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next
End Sub

Mike

"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Tabs

Lois posted this in the wrong sub thread

Hi,

You could add the sheets with code but you can also do it using but that
will affect all workbooks you open. Try this modified code

Sub Name_Sheets()
numsheets = Worksheets.Count
For i = 1 To 12
If i numsheets Then
Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name = MonthName(i)
Else
Sheets(i).Name = MonthName(i)
End If
Next
End Sub



"Lois" wrote:

Great!! that saves me a lot of time! is there any way 12 sheets can
automativally be inserted into a workbook as oppose to 3? that way i dont
even have to insert the 12 tabs!!
--
Lois


"Mike H" wrote:

Hi,

You could rune this simple macro. Right click any sheet tab, view code and
paste the code in.

Sub Name_Sheets()
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next
End Sub

Mike

"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 42
Default Tabs

Great thanks
--
Lois


"Mike H" wrote:

Lois posted this in the wrong sub thread

Hi,

You could add the sheets with code but you can also do it using but that
will affect all workbooks you open. Try this modified code

Sub Name_Sheets()
numsheets = Worksheets.Count
For i = 1 To 12
If i numsheets Then
Worksheets.Add(After:=Worksheets(Worksheets.Count) ).Name = MonthName(i)
Else
Sheets(i).Name = MonthName(i)
End If
Next
End Sub



"Lois" wrote:

Great!! that saves me a lot of time! is there any way 12 sheets can
automativally be inserted into a workbook as oppose to 3? that way i dont
even have to insert the 12 tabs!!
--
Lois


"Mike H" wrote:

Hi,

You could rune this simple macro. Right click any sheet tab, view code and
paste the code in.

Sub Name_Sheets()
On Error Resume Next
For i = 1 To 12
Sheets(i).Name = MonthName(i)
Next
End Sub

Mike

"Lois" wrote:

Hi
When setting up spreadsheets in work, the tabs are always named the months
of the year. Is there any quick way of naming tabs in a workbook with a
'default' name so they dont have to be continously typed onto each workbook?
--
Lois

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Tabs

I would suggest creating a Template(*.xlt) file with all you customizations
including 12 sheets with the month names etc.

Use that Template as the basis for all workbooks.

No need for macros.

See help on Templates for more info.


Gord Dibben MS Excel MVP

On Thu, 2 Apr 2009 00:56:01 -0700, Lois
wrote:

Great!! that saves me a lot of time! is there any way 12 sheets can
automativally be inserted into a workbook as oppose to 3? that way i dont
even have to insert the 12 tabs!!


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
tabs are missing even though 'tools-options-view-sheet tabs' ok? rgranell Excel Worksheet Functions 3 August 16th 08 04:25 PM
Can we modify any of the ribbon tabs or create new ribbon tabs? Scott Sornberger New Users to Excel 2 March 19th 08 11:41 AM
hide tabs from view then lock tabs? slowboat Excel Discussion (Misc queries) 1 December 19th 07 07:06 AM
Can i set up tabs within tabs on Excel? Gizelle Excel Worksheet Functions 5 October 30th 06 12:52 PM
How to hid just one or two tabs Jcarriere Excel Discussion (Misc queries) 1 January 31st 06 02:15 AM


All times are GMT +1. The time now is 03:11 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"