Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-09-2016, 10:33 AM
BobBridges's Avatar
BobBridges BobBridges is offline Highlight row without affecting existing hihglighting Windows 7 64bit Highlight row without affecting existing hihglighting Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

I wasn't sure what you meant, Dee; if you highlight a range, it just changes the highlighting from what it was. Did you mean (I wondered) you wanted to highlight all the cells in the current row except those that were already highlighted (perhaps a different color)? That can be done, but it involves looking at each cell in the row and highlighting only those that don't have it already.

But I went back and looked; Peco's solution seems to clear out all highlighting everywhere on the worksheet before highlighting the row. I'm not sure why; that thread was a long time ago and I no longer remember what we may have been thinking then. But if you don't want to do that, this is the culprit:

Code:
Target.Parent.Cells.Interior.ColorIndex = 0
Remove that statement and you should be good.

Actually, that whole thing can be much simpler, if you prefer:

Code:
Private Sub Worksheet_SelectionChange(ByVal org As Range)
  Target.EntireRow.Interior.ColorIndex = 8
  End Sub
That one statement is all it takes, for something simple like this.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change color of existing borders for an existing table JayUSA PowerPoint 1 01-21-2016 04:21 PM
Highlight row without affecting existing hihglighting Style affecting other paragraphs around the word I'm trying to change. Bahamut5098 Word 2 03-02-2015 01:42 PM
Applying layout to existing slides without affecting font mgw130 PowerPoint 3 12-15-2012 04:38 AM
Highlight row without affecting existing hihglighting Formatting affecting more than selected text esteban Word 7 05-25-2012 04:34 AM
find - reading highlight - highlight all / highlight doesn't stick when saved bobk544 Word 3 04-15-2009 03:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft