Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have this macro right now ,when i type anything in cell C300 the tab does
change colour this is what i want. Now i want to Type only QC in this cell so that the tab changes colour is this possible with modijying this macro Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If Intersect(Target, Range("C300")) Is Nothing Then Exit Sub ActiveSheet.Tab.ColorIndex = 15 End Sub |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) Dim myRngToInspect As Range Set myRngToInspect = Sh.Range("C300") If Target.Cells.Count 1 Then Exit Sub End If If Intersect(Target, myRngToInspect) Is Nothing Then Exit Sub End If If LCase(Target.Value) = LCase("qc") Then sh.Tab.ColorIndex = 3 'red for me Else sh.Tab.ColorIndex = xlNone 'change it back End If End Sub Much like the other worksheet_change event in your other thread. Mike wrote: I have this macro right now ,when i type anything in cell C300 the tab does change colour this is what i want. Now i want to Type only QC in this cell so that the tab changes colour is this possible with modijying this macro Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If Intersect(Target, Range("C300")) Is Nothing Then Exit Sub ActiveSheet.Tab.ColorIndex = 15 End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
need help to update macro to office 2007 macro enabled workbook | Excel Discussion (Misc queries) | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |