Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I change sheet tab color based on cell value in sheet?

I use an Excel spreadsheet form to track various landscaping projects. I
denote the status of the project by using colors assigned by conditional
formatting based on the value of a status drop-down listbox on the sheet,
which works great, but I'd also like the tab color of the sheet to match the
status the various status colors I've chosen. Is there a way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I change sheet tab color based on cell value in sheet?


Hello SCAScot,

You can't change the color of the Worksheet tabs. The Tabs object class
doesn't have a BackColor property like most objects, and the other
obstacle is Excel doesn't expose the Worksheet Tab properties through
VBA.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487699

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default How can I change sheet tab color based on cell value in sheet?

Unless you are using Excel 2002 or late in which case you can. This
examle changes the tab color every time the value in Cell A1 changes.
This is worksheet event code. Right click the sheet tab, select view
code and paste the event in there. Change it to suit your needs:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Target.Address = "$A$1" Then
Select Case Target.Value
Case 5
Me.Tab.ColorIndex = 36
Case 6
Me.Tab.ColorIndex = 35
Case Else
Me.Tab.ColorIndex = xlNone
End Select
End If
End If
End Sub

Hope this helps
Rowan

Leith Ross wrote:
Hello SCAScot,

You can't change the color of the Worksheet tabs. The Tabs object class
doesn't have a BackColor property like most objects, and the other
obstacle is Excel doesn't expose the Worksheet Tab properties through
VBA.

Sincerely,
Leith Ross


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change cell color in protected sheet ansa Excel Worksheet Functions 2 May 2nd 13 12:34 PM
Assign Color to a Cell based on another Cell on a diff Sheet VROSARIO7 Excel Worksheet Functions 2 July 6th 09 08:53 PM
Set color of cell based on info on another sheet? 43fan Excel Worksheet Functions 2 December 13th 05 07:53 PM
copy and paste to another sheet based in cell color nat3ten Excel Programming 7 July 8th 05 11:14 PM
How do I change the Cell color automatically in an Excel sheet wh. stump Excel Worksheet Functions 2 January 6th 05 02:14 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"