K
Keith Wilby
I have coded MS Access to manipulate an Excel Workbook. Some of the code
conditionally formats columns. The code works a treat ... on my PC. When a
colleague runs the same file, the cell range is offset by 10 columns and one
row. I've tried everything I can think of to rectify this but have run out
of ideas. Is there anything I can check in terms of settings, options and
the like?
It's worth noting that I'm starting at column J which is column 10 (the same
as the phantom offset).
We're both running Office 2k3 SP2.
Many thanks.
Keith.
'Format the cells for progress. Red for negative, green for positive, else
white.
Set objRange = objXL.Intersect(objSht.Range("K2:IV65536"), objSht.UsedRange)
'Start from Row 2
With objRange
.Select
.Cells(1, 1).Activate
.FormatConditions.Delete
.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:="="
& .Cells(1, 0).Address(False, False)
.FormatConditions(1).Interior.ColorIndex = 3 'Conditionally format cells
red
.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater,
Formula1:="=" & .Cells(1, 0).Address(False, False)
.FormatConditions(2).Interior.ColorIndex = 4 'Conditionally format cells
red
End With
conditionally formats columns. The code works a treat ... on my PC. When a
colleague runs the same file, the cell range is offset by 10 columns and one
row. I've tried everything I can think of to rectify this but have run out
of ideas. Is there anything I can check in terms of settings, options and
the like?
It's worth noting that I'm starting at column J which is column 10 (the same
as the phantom offset).
We're both running Office 2k3 SP2.
Many thanks.
Keith.
'Format the cells for progress. Red for negative, green for positive, else
white.
Set objRange = objXL.Intersect(objSht.Range("K2:IV65536"), objSht.UsedRange)
'Start from Row 2
With objRange
.Select
.Cells(1, 1).Activate
.FormatConditions.Delete
.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, Formula1:="="
& .Cells(1, 0).Address(False, False)
.FormatConditions(1).Interior.ColorIndex = 3 'Conditionally format cells
red
.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater,
Formula1:="=" & .Cells(1, 0).Address(False, False)
.FormatConditions(2).Interior.ColorIndex = 4 'Conditionally format cells
red
End With