Question Locked

How do i highlight the active cell in Excel?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Is there a way to highlight the active cell in excel, so that when you click on a cell it shows up in yellow or some other color? I'm not referring to the option to use the paint bucket to fill the active cell. I want the highlight to disappear from the active cell after it is no longer the active cell. Several users have come to me and asked and I do not know how to do that.

4 replies

by kenneth.johnson9

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

I would much rather have it for all books,,, but would be completely satisfied with a per sheet basis. Users will just have to suffer : )

by kenneth.johnson9

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.