Results 1 to 2 of 2

Highlight a selected row

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-26-2008
    Location
    UK
    MS-Off Ver
    Using Excel 2019
    Posts
    317

    Highlight a selected row

    Hi,

    I have some code which highlights an entire row depending upon which row is selected:

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    Cells.Interior.ColorIndex = -4142
    With Target.EntireRow.Interior
    .ColorIndex = 6
    End With
    End Sub
    This works nicely but has two problems.

    1) It removes all current cell formatting - which i would like to keep

    2) It highlights the entire row and not a range of cells (ie. A7:K1000)

    Could anyone help me modify this?

    Thanks
    Last edited by Barking_Mad; 03-10-2010 at 11:39 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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