This does it:
Delete the following lines from the current code:
Const cnNUMCOLS As Long = 256
Const cnHIGHLIGHTCOLOR As Long = 36 'default lt. yellow
Static rOld As Range
Static nColorIndices(1 To cnNUMCOLS) As Long
Insert the following lines in the declaration area of a standard
module:
Public Const cnNUMCOLS As Long = 256
Public nColorIndices(1 To cnNUMCOLS) As Long
Public Const cnHIGHLIGHTCOLOR As Long = 36 'default lt. yellow
Public rOld As Range
Add the following code to the ThisWorkbook code module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim i As Long
With rOld.Cells
For i = 1 To cnNUMCOLS
.Item(i).Interior.ColorIndex = nColorIndices(i)
Next i
End With
End Sub
That's it.
The only thing that's required is to select a different row from the
active cell to restart the row highlighting but this could be
corrected by commenting out or deleting the line:
If .Row = ActiveCell.Row Then Exit Sub 'same row, don't restore
but would add to row flicker if moving left and right in the same row.