ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change color of active cells (https://www.excelbanter.com/excel-discussion-misc-queries/135474-change-color-active-cells.html)

Steph

Change color of active cells
 
Does anyone know if there is a way to change the color of active cells?

Gary''s Student

Change color of active cells
 
Put the following in Worksheet code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Selection.Interior.ColorIndex = 6
End Sub


REMEMBER; Worksheet code, not a standard module.
--
Gary''s Student
gsnu200711



All times are GMT +1. The time now is 02:42 AM.

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