Trước đây em sử dụng macro như bên dưới để đánh dấu hàng ngang hàng dọc bằng màu khi kích chuột vào 1 ô, giờ em làm nhưng không được các anh chị xem giúp em macro có sai chỗ nào không ạ. Em xin cảm ơn rất nhiều.
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Cells.Interior.ColorIndex = 0
ActiveCell.EntireRow.Interior.ColorIndex = 8
ActiveCell.EntireColumn.Interior.ColorIndex = 8
Application.CutCopyMode = True
End Sub
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Cells.Interior.ColorIndex = 0
ActiveCell.EntireRow.Interior.ColorIndex = 8
ActiveCell.EntireColumn.Interior.ColorIndex = 8
Application.CutCopyMode = True
End Sub