+ Reply to Thread
Results 1 to 2 of 2

Auto Fill workshseet tabs?

  1. #1
    Sandy@theblade
    Guest

    Auto Fill workshseet tabs?

    I have a workbook with a page for each day of the month, named for the day
    and date. I need to copy it for each month. Can I auto fill the tabs on the
    worksheets like I would a column?

  2. #2
    Dave Peterson
    Guest

    Re: Auto Fill workshseet tabs?

    Maybe a little macro???

    Option Explicit
    Sub testme()

    Dim iCtr As Long
    Dim myDate As Date

    myDate = DateSerial(2005, 8, 1)

    For iCtr = DateSerial(Year(myDate), Month(myDate), 1) _
    To DateSerial(Year(myDate), Month(myDate) + 1, 0)
    Worksheets.Add after:=Worksheets(Worksheets.Count)
    On Error Resume Next
    ActiveSheet.Name = Format(iCtr, "dddd mm_dd_yyyy")
    If Err.Number <> 0 Then
    MsgBox "Error with date: " & Format(iCtr, "mm/dd/yyyy")
    Err.Clear
    Application.DisplayAlerts = False
    ActiveSheet.Delete
    Application.DisplayAlerts = True
    End If
    On Error GoTo 0
    Next iCtr

    End Sub

    If you're new to macros, you may want to read David McRitchie's intro at:
    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    (ps. I used August of 2005 for the month to add.)

    Sandy@theblade wrote:
    >
    > I have a workbook with a page for each day of the month, named for the day
    > and date. I need to copy it for each month. Can I auto fill the tabs on the
    > worksheets like I would a column?


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1