4 replies
by freakyj92 Accepted solution
by kenneth.johnson9 Accepted solution
I know of no way to do that, but that does not mean that it is possible. But before I go hacking around, lemme ask you this:
Is this assumed that it should be a configuration change so that it happens on all books? Or can it be on a per sheet basis where the book already exists and in modified as necessary?
by freakyj92 Accepted solution
by kenneth.johnson9 Accepted solution
Actually, this may work:
----------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'if the old range is nothing the do nothing
If Not var_old_range Is Nothing Then
var_old_range.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set var_old_range = Target
End Sub
-----------------------------------------
You would probably need to add code to skip the colorindex statement if the entire sheet was selected. this happens if you are on a different sheet and then select the sheet that has this code on it. The workaround is to select the entire sheet and then fill with nothing (white). This method WILL destroy all fill formats so it is not the best option in the long run.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending