Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Naming Consectutive Excel Tabs

Is there a way I can put the DATE on the 3/4th Tab, and have each Tab after
it Auto put the next Date on them, having enough tabs for a month + a few
main page tabs.

Thanks
Mastermk

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

You need a macro to do this..Try the below which will name the 3rd sheet to
the current date ...and on every workbook open check whether the current date
sheet is available. If not a new sheet by the name of current sheet....
--Try this in a blank workbook with 4 sheets
--Try renaming the 3rd sheet to a date 10-15-2009 and open/save/close the
workbook continuosly..The macro should create additional sheets everytime you
open upto the current date.

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_Open()

Dim ws As Worksheet, strDate As String
For Each ws In Worksheets
If IsDate(ws.Name) Then strDate = ws.Name
Next
If strDate = "" Then
strDate = Format(Date, "mm-dd-yyyy")
Set ws = Worksheets(3): ws.Name = strDate
Else
If CDate(strDate) + 1 <= Date Then
Set ws = Worksheets.Add(After:=Worksheets(CStr(strDate)))
strDate = Format(CDate(strDate) + 1, "mm-dd-yyyy")
ws.Name = strDate
End If
End If
End Sub

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


"mastermk" wrote:

Is there a way I can put the DATE on the 3/4th Tab, and have each Tab after
it Auto put the next Date on them, having enough tabs for a month + a few
main page tabs.

Thanks
Mastermk

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Naming Consectutive Excel Tabs

see response to your posting in another group.

--
Regards
Roger Govier

"mastermk" wrote in message
...
Is there a way I can put the DATE on the 3/4th Tab, and have each Tab
after
it Auto put the next Date on them, having enough tabs for a month + a few
main page tabs.

Thanks
Mastermk


__________ Information from ESET Smart Security, version of virus
signature database 4527 (20091020) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4527 (20091020) __________

The message was checked by ESET Smart Security.

http://www.eset.com



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 HUTCH Excel Worksheet Functions 1 September 3rd 09 06:11 PM
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


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

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"