Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Nancy Thomas   on Mar 11 In MS Office Category.

  
Question Answered By: Kaysah Mohammad   on Mar 11

Sure, but use them in a select case statement

Sub ChangeTabColors()
Dim MySheet As Worksheet
Set MySheet = ActiveSheet
Select Case MySheet.Range("O7").Value

Case "Plate"
MySheet.Tab.Color = RGB(0, 0, 255)
Case "Rod"
MySheet.Tab.Color = RGB(0, 255, 0)
Case Else
MySheet.Tab.Color = RGB(127, 127, 127)
End Select
End Sub

Note:
RGB Colors:
Color: Red Value, Green Value, Blue Value
Black: 0, 0, 0
Blue: 0, 0, 255
Green: 0, 255, 0
Cyan: 0, 255, 255
Red: 255, 0, 0
Magenta: 255, 0, 255
Yellow: 255, 255, 0
White: 255, 255, 255

Grey: 127, 127, 127

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Changing Tab Color Excel 2003 Or get search suggestion and latest updates.


Tagged: