+ Reply to Thread
Results 1 to 2 of 2

Sheet Tab Color - Finally

  1. #1
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    Excel 365
    Posts
    158

    Sheet Tab Color - Finally

    Hello all,
    Yesterday we were trying to color the sheet tab that matched the date -1 day while trying to return no color for the previous day in Excel 2002. I modified the code and placed these to lines in:

    Sheets(Format(Date - 2, "mmmd")).Activate
    ActiveSheet.Tab.ColorIndex = xlNone


    So the whole code is:


    Private Sub Workbook_Open()
    On Error Resume Next
    On Error GoTo 0
    Sheets(Format(Date - 2, "mmmd")).Activate
    ActiveSheet.Tab.ColorIndex = xlNone
    Sheets(Format(Date - 1, "mmmd")).Activate
    ActiveSheet.Tab.ColorIndex = 3
    Range("C15").Select
    End Sub

    I want to thank everyone who helped out.
    Mike

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad your problem is fixed

    Thanks for sharing the solution with us

    Carim

+ 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