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

Does anyone know a way to automate the naming of worksheet tabs? For
example, I like to put download dates on my tabs. I'd like to reference a
tab name to a cell on the spreadsheet that contains the download date.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Naming Tabs

Set the security level to low/medium in (Tools|Macro|Security). From workbook
press Alt+F11 to launch VBE (Visual Basic Editor). From the left treeview
search for the workbook name and click on + to expand it. Within that you
should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code pane.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Count = 1 And Target.Address = "$B$5" Then
If Trim(Target.Text) < "" And IsDate(Target.Text) Then
Sh.Name = Format(CDate(Target.Text), "dd-mmm-yyyy")
End If
End If
End Sub

The code will look at entries made in cell B5 and if it is a date names the
worksheets accordingly

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


"HUTCH" wrote:

Does anyone know a way to automate the naming of worksheet tabs? For
example, I like to put download dates on my tabs. I'd like to reference a
tab name to a cell on the spreadsheet that contains the download date.

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
naming tabs steve Excel Worksheet Functions 2 December 1st 07 08:15 PM
Naming tabs Mike Excel Worksheet Functions 5 November 27th 07 05:04 PM
Naming Tabs ebro Excel Discussion (Misc queries) 3 July 13th 06 11:07 PM
naming tabs Jeff Excel Worksheet Functions 8 February 6th 06 04:41 AM
Naming Sheets Tabs Cgbilliar Excel Worksheet Functions 2 November 5th 04 05:21 PM


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