+ Reply to Thread
Results 1 to 3 of 3

Opening up named worksheets according to the day of the month

Hybrid View

  1. #1
    Steven
    Guest

    Opening up named worksheets according to the day of the month

    Please help - Trying to write macro that would open up to a certained named
    worksheet (1-31) based on the day of the current month. I have created a
    formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
    open up the corresponding named sheet.

    Any help would be appreciated. TIA.

  2. #2
    Ardus Petus
    Guest

    Re: Opening up named worksheets according to the day of the month

    Without any error checking (all worksheets must exist):

    Private Sub Workbook_Open()
    Worksheets(Format(Day(Date), 0)).Activate
    End Sub

    HTH
    --
    AP

    "Steven" <Steven@discussions.microsoft.com> a écrit dans le message de
    news:48628696-E45D-4C52-BB2F-62F40C375A67@microsoft.com...
    > Please help - Trying to write macro that would open up to a certained

    named
    > worksheet (1-31) based on the day of the current month. I have created a
    > formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
    > open up the corresponding named sheet.
    >
    > Any help would be appreciated. TIA.




  3. #3
    Steven
    Guest

    Re: Opening up named worksheets according to the day of the month

    Ardus - you did it. Thanks. Without the error checking it works beautiful.
    Thanks for the quick response. Have a Guinness on me.

    Cheers

    "Ardus Petus" wrote:

    > Without any error checking (all worksheets must exist):
    >
    > Private Sub Workbook_Open()
    > Worksheets(Format(Day(Date), 0)).Activate
    > End Sub
    >
    > HTH
    > --
    > AP
    >
    > "Steven" <Steven@discussions.microsoft.com> a écrit dans le message de
    > news:48628696-E45D-4C52-BB2F-62F40C375A67@microsoft.com...
    > > Please help - Trying to write macro that would open up to a certained

    > named
    > > worksheet (1-31) based on the day of the current month. I have created a
    > > formula =DAY(LEFT(NOW(),5)) that calaculates a value. Now I need it to
    > > open up the corresponding named sheet.
    > >
    > > Any help would be appreciated. TIA.

    >
    >
    >


+ 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