Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Daily "Tabs"

I need to create a macro that will generate a "Tab" or worksheet for every
day of the month. I can not figure out how to programaticaly rename a
spreadsheet after it is added.

if I do sheets.add
What name is it given by default? (is it SheetX?)
How can I rename this worksheet if I do not know the default "X"
name/number it is given?

Thanks!!
Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Daily "Tabs"

Greg

Name the sheets as you add them.

Sub Add_Sheets()
For i = 31 To 1 Step -1
Worksheets.Add.Name = "January " & i
Next
End Sub


Gord Dibben MS Excel MVP


On Mon, 8 Jan 2007 12:06:00 -0800, Gary''s Student
wrote:

Hi Greg:

for three days of the month:

Sub sname()
dnames = Array("First of Month", "Second of Month", "Third of Month")
For i = 1 To 3
Sheets(i).Name = dnames(i - 1)
Next
End Sub

adapt as you desire


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
How to schedule an auto "Save As" of an Excel spreadsheet daily... Turbine Mechanic Excel Worksheet Functions 2 August 16th 08 01:27 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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