View Full Version : highlight Cell
av8tordude
04-03-2012, 11:52 AM
When locating the cursor, it can be identified by the cell with the white outlined around it. Is it possible to change it to highlight the cell instead of the white outline?
av8tordude
04-03-2012, 12:30 PM
Ok...I found this code, but it still displays the cursor outline around the select cell. i want to remove the outline
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldCell As Range
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If
Target
Set OldCell = Target
End Sub
DannyBOHLEN
04-04-2012, 09:39 AM
see this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim RngRow As Range
Dim RngCol As Range
Dim RngFinal As Range
Dim Row As Long
Dim Col As Long
Cells.Interior.ColorIndex = xlNone
Row = Target.Row
Col = Target.Column
Set RngRow = Range("A" & Row, Target)
Set RngCol = Range(Cells(1, Col), Target)
Set RngFinal = Union(RngRow, RngCol)
RngFinal.Interior.ColorIndex = 4
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.