0
我從谷歌獲得了此代碼。我想知道如何讓代碼不會刪除用戶所做的以前或新的突出顯示。自動突出顯示代碼
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.ScreenUpdating = False
' Clear the color of all the cells
Cells.Interior.ColorIndex = 0
With Target
' Highlight the entire row and column that contain the active cell
.EntireRow.Interior.ColorIndex = 36
.EntireColumn.Interior.ColorIndex = 36
End With
Application.ScreenUpdating = True
End Sub