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 |
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 |
All times are GMT +1. The time now is 08:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com