Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using this Macro in excell 2007 & works well & when i use it for 2003 i
get a run time error 1004 alarm WHY!! can this be changed so it can be used for both . WHEN alarm come the debug screen come up & Sh.Tab.ColorIndex = 3 'red for me high lights yellow Sh.Tab.ColorIndex = 2 'White for me High lights yellow 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 UCase(Target.Value) = UCase("QC") Then Sh.Tab.ColorIndex = 3 'red for me Else Sh.Tab.ColorIndex = 2 'White for me End If End Sub |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You never answered the follow-up questions from your post from Monday.
Mike wrote: I am using this Macro in excell 2007 & works well & when i use it for 2003 i get a run time error 1004 alarm WHY!! can this be changed so it can be used for both . WHEN alarm come the debug screen come up & Sh.Tab.ColorIndex = 3 'red for me high lights yellow Sh.Tab.ColorIndex = 2 'White for me High lights yellow 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 UCase(Target.Value) = UCase("QC") Then Sh.Tab.ColorIndex = 3 'red for me Else Sh.Tab.ColorIndex = 2 'White for me End If End Sub -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I guess you answered the questions in a new thread. As a rule, it's best to
stay in the same thread. Just a couple of guesses... Your workbook is protected. You're not really running xl2003 on the other pc. What do you see under the Help|about MS Office Excel? Mike wrote: I am using this Macro in excell 2007 & works well & when i use it for 2003 i get a run time error 1004 alarm WHY!! can this be changed so it can be used for both . WHEN alarm come the debug screen come up & Sh.Tab.ColorIndex = 3 'red for me high lights yellow Sh.Tab.ColorIndex = 2 'White for me High lights yellow 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 UCase(Target.Value) = UCase("QC") Then Sh.Tab.ColorIndex = 3 'red for me Else Sh.Tab.ColorIndex = 2 'White for me End If End Sub -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I copied and pasted your code into Excel 2003 and it worked for me...
"Mike" wrote: I am using this Macro in excell 2007 & works well & when i use it for 2003 i get a run time error 1004 alarm WHY!! can this be changed so it can be used for both . WHEN alarm come the debug screen come up & Sh.Tab.ColorIndex = 3 'red for me high lights yellow Sh.Tab.ColorIndex = 2 'White for me High lights yellow 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 UCase(Target.Value) = UCase("QC") Then Sh.Tab.ColorIndex = 3 'red for me Else Sh.Tab.ColorIndex = 2 'White for me End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions |