ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Active Cell Color (https://www.excelbanter.com/excel-discussion-misc-queries/76188-active-cell-color.html)

jamex

Active Cell Color
 

How to change active cell color as red or any?


--
jamex
------------------------------------------------------------------------
jamex's Profile: http://www.excelforum.com/member.php...o&userid=32243
View this thread: http://www.excelforum.com/showthread...hreadid=520574


Gord Dibben

Active Cell Color
 
Do you mean you wish to highlight the active cell as you change selection?

i.e. just active cell is red.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 3
Set OldCell = Target
End Sub

Note: this is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module.

If not what you're looking for, post back.


Gord Dibben MS Excel MVP


On Thu, 9 Mar 2006 08:42:19 -0600, jamex
wrote:


How to change active cell color as red or any?




All times are GMT +1. The time now is 01:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com