Consulting

Results 1 to 4 of 4

Thread: Solved: Whole row becomes shaded / highlighted when selected

  1. #1
    VBAX Contributor
    Joined
    Dec 2006
    Posts
    193
    Location

    Solved: Whole row becomes shaded / highlighted when selected

    Can Malcoms code seen below from a previous post be altered to also shade/ highlight the entire row say light grey

    [VBA]Option Explicit
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Font.Bold = False
    Target.EntireRow.Font.Bold = True
    End Sub [/VBA]

    THKS

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    [VBA]Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Font.Bold = False
    Target.EntireRow.Font.Bold = True
    Target.EntireRow.Interior.ColorIndex = 15
    End Sub
    [/VBA]

  3. #3
    VBAX Contributor
    Joined
    Dec 2006
    Posts
    193
    Location
    MANY THANKS

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Don't forget to clear last time

    [vba]
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.Interior.ColorIndex = xlColorIndexNone
    Cells.Font.Bold = False
    Target.EntireRow.Font.Bold = True
    Target.EntireRow.Interior.ColorIndex = 15
    End Sub
    [/vba]

Posting Permissions

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