Highlight column heading of current cell
Hi C,
Try:
'=============
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("B3")
If Target.Column = 2 Then
.Interior.ColorIndex = 6
Else
.Interior.ColorIndex = xlNone
End If
End With
End Sub
'<<=============
This is worksheet event code and should be pasted into the worksheets's code
module (not a standard module and not the workbook's ThisWorkbook module):
Right-click the worksheet's tab
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.
---
Regards,
Norman
wrote in message
oups.com...
I have searched and cannot find an answer. I am using Excel 2000 and
would like to create a function that will highlight a column heading in
row three if the current cell is in that particular column. Let's say I
have 10 columns. If I am at a cell in any row in column 2, then
highlight cell B2 else leave white. Is this possible via vba? How?
|