PC Review


Reply
Thread Tools Rate Thread

Daily "Tabs"

 
 
Greg Franke
Guest
Posts: n/a
 
      8th Jan 2007
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


 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      8th Jan 2007
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
<(E-Mail Removed)> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference of entries in tabs "Sharing permissions" vs. "Security" ? Martin Caldwell Windows XP Help 3 23rd Apr 2006 04:54 PM
Difference of entries in tabs "Sharing permissions" vs. "Security" ? Martin Caldwell Windows XP General 0 23rd Apr 2006 01:46 PM
"General" and "View" Tabs missing under Folder Options Reid Windows XP Customization 3 19th Mar 2004 11:31 PM
Cookies will not enable even after changing settings for "Security" and "Privacy" tabs in "Internet Options", any suggestions? =?Utf-8?B?dGlhbmltaA==?= Windows XP Help 2 27th Jan 2004 12:46 AM
"General" and "Programs" tabs disappeared in internet options Steve Windows XP Internet Explorer 1 10th Sep 2003 04:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 PM.