+ Reply to Thread
Results 1 to 2 of 2

Highlight Active Cell Row & Column W/OUT clearing background colors of other cells

  1. #1
    Registered User
    Join Date
    08-10-2016
    Location
    US
    MS-Off Ver
    365
    Posts
    70

    Highlight Active Cell Row & Column W/OUT clearing background colors of other cells

    I look at numbers all day and the below code really keeps me from losing my spot. See Attached and click anywhere. BUT, how can I STOP this code from clearing all other background colors from the spreadsheet?


    [CODE]
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    Application.ScreenUpdating = False
    'Clear all cell colours
    Cells.Interior.ColorIndex = 0
    With Target
    'Row and column highlightingfor the active cell
    .EntireRow.Interior.ColorIndex = 19
    .EntireColumn.Interior.ColorIndex = 19
    End With
    Application.ScreenUpdating = True
    End Sub
    [CODE]
    Attached Files Attached Files
    Last edited by agroeneveld; 11-04-2016 at 04:27 PM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Highlight Active Cell Row & Column W/OUT clearing background colors of other cells

    Hello agroeneveld,

    The Forum Rules prohibits me from helping you since; Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  2. Highlight Column When Cell Selected Without Removing the Sheets Other Background Colours
    By mackenzie.costello in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-15-2015, 09:19 AM
  3. Background color of cell based on colors in column
    By mez275 in forum Excel General
    Replies: 1
    Last Post: 09-28-2013, 05:06 PM
  4. Replies: 0
    Last Post: 04-04-2012, 02:50 PM
  5. Highlight the row and column of the active cell
    By ictodd in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-20-2011, 09:26 PM
  6. Replies: 1
    Last Post: 10-09-2008, 01:00 PM
  7. Highlight a row without losing background colors
    By Naceur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1