Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to schedule an auto "Save As" of an Excel spreadsheet daily... | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |