Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to change row color when select a cell in this row?

Amolin, SelectionChange event makes this possible as follow.
If you have already colored cell in the wks, need more code.
Please note, this is just a sample code.


Code
-------------------

'Wks Module
Dim preservedRange As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not preservedRange Is Nothing Then
preservedRange.Interior.ColorIndex = xlNone
End If
Target.EntireRow.Cells.Interior.ColorIndex = 10
Set preservedRange = Target.EntireRow
End Sub

-------------------


--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why font color change back to black when I select a different cell Cody Excel Worksheet Functions 1 March 2nd 10 07:35 AM
Change tab color based on current color of a cell MarkT Excel Discussion (Misc queries) 0 May 22nd 08 05:46 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM
In excell 2003 I select a cell and try to refill with any color ksv raj Excel Worksheet Functions 0 October 2nd 05 06:02 PM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"