K
KevHardy
Hi,
Found a bit of code on the web (below) to highlight the active row but need
something that will remove the highlight (not the data) when the workbook is
closed so that the next time you open it nothing is highlighted.
At present when you re-open it a row is still highlighted and then when you
select a cell you end up with two rows highlighted!
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Excel.Range)
Static OldRng As Range
On Error Resume Next
Target.EntireRow.Interior.ColorIndex = 6
OldRng.EntireRow.Interior.ColorIndex = xlColorIndexNone
Set OldRng = Target
End Sub
Found a bit of code on the web (below) to highlight the active row but need
something that will remove the highlight (not the data) when the workbook is
closed so that the next time you open it nothing is highlighted.
At present when you re-open it a row is still highlighted and then when you
select a cell you end up with two rows highlighted!
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Excel.Range)
Static OldRng As Range
On Error Resume Next
Target.EntireRow.Interior.ColorIndex = 6
OldRng.EntireRow.Interior.ColorIndex = xlColorIndexNone
Set OldRng = Target
End Sub