Hi
With Worksheets("MyOtherSheet")
.Range("C5").Interior.ColorIndex = -4138 - .Range
("C5").Interior.ColorIndex
End with
note the period in front of both Range.
If you want to do it on all sheets
Dim ws as worksheet
For each ws in Activeworkbook.Worksheets
With ws
.Range("C5").Interior.ColorIndex = -4138 - .Range
("C5").Interior.ColorIndex
End with
regards
Paul
On May 12, 11:26*pm, LUKEMUDGE
wrote:
I have the VB script to change the background color of my cells working but I
would like it to change another cell in a different worksheet. Can anybody
help me out with how to program the reference?
Here is the VB script I'm using to change the colors at the moment
Range("C5").Interior.ColorIndex = -4138 - Range("C5").Interior.ColorIndex