View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Robb27 Robb27 is offline
external usenet poster
 
Posts: 27
Default color of active cell

Thanks keepITcool. It is just what I needed to help my very non-computer
literate employes very much.

Robb

"keepITcool" wrote:


Robb

I'm not a fan of such (useless) code, but.. If you think it serves a
purpose then put following in the sheet's code module

Option Explicit

Dim rngPrev As Range
Dim idxPrev As Long


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
Application.ScreenUpdating = False
If Not rngPrev Is Nothing Then rngPrev.Interior.ColorIndex = idxPrev
Set rngPrev = Target
idxPrev = rngPrev.Interior.ColorIndex
rngPrev.Interior.ColorIndex = 6
Application.ScreenUpdating = True
End Sub




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Robb27 wrote :

I have a variant of an earlier post.
I want to change the color of the active cell to yellow, but when the
active cell changes to another cell, I want the cell to revert back
to the original color it was prior to becoming the active cell. -
(hope that makes sense!) Many thanks in advance for making my life
easier.