右鍵點(diǎn)一下工作表名字(比如sheet1)→選查看代碼→把下面這段復(fù)制進(jìn)去→關(guān)掉窗口點(diǎn)×就行啦~
代碼如下:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Rows(Target.Row).Interior.ColorIndex = 6
Columns(Target.Column).Interior.ColorIndex = 6
Cells(Target.Row, Target.Column).Interior.ColorIndex = 33
End Sub
親測(cè)可用!借鑒大佬的,整理了一下方便大家用,有需要的拿走不謝~
代碼如下:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
Rows(Target.Row).Interior.ColorIndex = 6
Columns(Target.Column).Interior.ColorIndex = 6
Cells(Target.Row, Target.Column).Interior.ColorIndex = 33
End Sub
親測(cè)可用!借鑒大佬的,整理了一下方便大家用,有需要的拿走不謝~
