Macro Help

M

Mike

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
 
D

Dave Peterson

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top