Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Hủy bỏ lệnh to màu cho vùng A1:Z1000
With Range("A1:Z1000").Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'Thực hiện tô màu cho ô được chọn
With Target.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment