stelios
New Member
I have found this code by searching witch is perfect
the point is that i want to retain the previous formating of cells when i select another cell.
and also i would like to create a switch to turn the Worksheet_SelectionChange event on and off. the tricky part is here i guess, becouse i would like when turned off to retain the previous formating also.
Any ideas?
Thanks for your help and precious time in advance.
Stelios
Code:
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
Cells.Interior.ColorIndex = 0
With Target 'With the cell that was selected,
.EntireRow.Interior.ColorIndex = 8
.EntireColumn.Interior.ColorIndex = 8
End With
and also i would like to create a switch to turn the Worksheet_SelectionChange event on and off. the tricky part is here i guess, becouse i would like when turned off to retain the previous formating also.
Any ideas?
Thanks for your help and precious time in advance.
Stelios