Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 9 of 9

Thread: Conditional worksheet tab color????

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is it possible to have a worksheet's tab color change based on whether or not any information has been entered into any of its cells?

    Any help is greatly appreciated!!!

    Thanks.

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Only in Excel XP



  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Any chance of VB script on this?

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Place this in the Private module of the Worksheet.


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
    Me.tab.Color.Index = 6
    End If
    End Sub

  5. #5
    Board Regular
    Join Date
    Mar 2002
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    After placing the above code into a new worksheet to test it, then entering a number in one of the cells covered by the range, I got a "runtime error 424 - Object required".

    When I go to DeBug, the line with "Me.Tab.Color.Index = 6" is hilighted. I am trying to do this with Excel 2002 rather than XE as prescribed above.

    Any ideas?

    Thanks

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    HI

    To (dont know how tot say.. repeat! again!)

    Dave saying on XP this is coded E2002, but there is no 2002 as such.... Office 98 is true and so is 2001 these are not for this board and not considered...

    should be ok you siad 2002 you mean PC version XP not PC version 2000? the others are APPLE MAC conversions, ermm Apple mac programms.


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  7. #7
    Board Regular
    Join Date
    Mar 2002
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Well...

    I am running Excel on a PC and when I go to the "help" menu and click on "about", it says I'm running Excel 2002.

  8. #8
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Well you bring good news, Excel 2002 in the help file ie about help abbout is readingg Excel 2002 this is fine you ok XP.

    Let me expalin!

    Its a Microsoft thing, need i say any more, the code dave provided should be ok....

    so lost, all i can suggerst is atler the code line that bugs in debug and edeit to suite,,,, like i say should be fine,.

    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  9. #9
    Board Regular
    Join Date
    Mar 2002
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Was able to make it work with a little bit of a change.

    Note the third line contains "ColorIndex" instead of "Color.Index"

    All's well!

    Thanks for the Help!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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