Closed Thread
Results 1 to 2 of 2

Highlight column headings when cursor is in a cell.

  1. #1
    ktho07
    Guest

    Highlight column headings when cursor is in a cell.

    When navigating a spreadsheet (e.g. cursor is placed in B12), I would like
    the letter Column Heading "B" and the Row Heading "12" to highlight in a
    different color other than standard gray. When moving cursor, each
    Heading/Row you pass through would change to a specified color - then
    returning to gray once you leave the cell.

  2. #2
    Bob Phillips
    Guest

    Re: Highlight column headings when cursor is in a cell.

    It already goes bold.

    Perhaps this alternative might help


    '----------------------------------------------------------------
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    '----------------------------------------------------------------
    Cells.FormatConditions.Delete
    With Target
    With .EntireRow
    .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
    With .FormatConditions(1)
    With .Borders(xlTop)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    With .Borders(xlBottom)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    .Interior.ColorIndex = 20
    End With
    End With
    With .EntireColumn
    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
    With .FormatConditions(1)
    With .Borders(xlLeft)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    With .Borders(xlRight)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    .Interior.ColorIndex = 20
    End With
    End With

    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
    .FormatConditions(1).Interior.ColorIndex = 36
    End With

    End Sub


    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "ktho07" <[email protected]> wrote in message
    news:[email protected]...
    > When navigating a spreadsheet (e.g. cursor is placed in B12), I would like
    > the letter Column Heading "B" and the Row Heading "12" to highlight in a
    > different color other than standard gray. When moving cursor, each
    > Heading/Row you pass through would change to a specified color - then
    > returning to gray once you leave the cell.




Closed Thread

Thread Information

Users Browsing this Thread

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

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