是的,要的就是这种效果。你的简单些。请问下你的代码和2008的区别在哪里,想学习下 你的: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim r As Long Cells.Interior.ColorIndex = 0 r = Selection.Row Range(Cells(r, 1), Cells(r, "q")).Interior.ColorIndex = 6 End Sub 2008的: Dim n As Byte Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean) n = IIf(Application.CutCopyMode = xlCopy, 0, 1) End Sub Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range) If Application.CutCopyMode = xlCopy And n = 1 Then n = 0: End Cells.Interior.ColorIndex = 0 Target.EntireRow.Interior.ColorIndex = 6 End Sub |