View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
JayBham62 JayBham62 is offline
external usenet poster
 
Posts: 3
Default Curser Highlight

Thanks Jim That is cool!

"Jim May" wrote:

Paste this into the files Thisworkbook Module - Selected cell will be
highlighted
in all your sheets - even better this macro does not affect existing
Conditional formatting..



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Static OldCell As Range
If Application.CutCopyMode = 0 Then
If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
OldCell.Borders.LineStyle = xlLineStyleNone
End If
Set OldCell = Target
OldCell.Interior.ColorIndex = 6
OldCell.Borders.LineStyle = xlContinuous
Else
If OldCell Is Nothing Then
Set OldCell = Target
Else
Set OldCell = Union(OldCell, Target)
End If
End If
End Sub

"JayBham62" wrote:

Does anyone know how to make the cell highlight, only when it it selected,
and keep moving with the curser as you move around the spreadsheet?