I found some code on an old Excel site on how to highlight the active cell. When this is running it does not allow you to copy and paste because you are updating the cell when you go to it. Is there a way to know if data is in memory for pasting so I can disable the code or is there a better way to highlight the active cell. I am posting the code below. Thanks
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldRange As Range
Static OldColor As Integer
Static NewColor As Integer
On Error Resume Next
NewColor = Target.Interior.ColorIndex
Target.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.Interior.ColorIndex = OldColor
Set OldRange = Target
OldColor = NewColor
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Static OldRange As Range
Static OldColor As Integer
Static NewColor As Integer
On Error Resume Next
NewColor = Target.Interior.ColorIndex
Target.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.Interior.ColorIndex = OldColor
Set OldRange = Target
OldColor = NewColor
End Sub