I have to work on large amount of data. So when I go through the date, I have difficulty to identify which cell I am currently active. So to identify I follow the following Youtube link
It works fine. I have the following code inside
The problem is, if the cell has background colour set, while leaving the cell the background colour is reset.
There is no issue with font colour.
So I may have to store the foreground colour in some variable and while leaving the cell I should restore the foreground colour back.
I am not sure how to declare variable, and where I should initialize the variable, and what function I should restore the variable?
Request your suggestion.
Thank you
It works fine. I have the following code inside
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Cells.Interior.ColorIndex = xlColorIndexNone
Target.EntireColumn.Interior.ColorIndex = 8
Target.EntireRow.Interior.ColorIndex = 8
Target.Interior.ColorIndex = 7
End Sub
The problem is, if the cell has background colour set, while leaving the cell the background colour is reset.
There is no issue with font colour.
So I may have to store the foreground colour in some variable and while leaving the cell I should restore the foreground colour back.
I am not sure how to declare variable, and where I should initialize the variable, and what function I should restore the variable?
Request your suggestion.
Thank you