Mewarnai Baris dan Kolom pada Cell Aktif


    Dim RngRow          As Range
    Dim RngCol          As Range
    Dim RngFinal        As Range
    Dim Row             As Long
    Dim Col             As Long
   
    Cells.Interior.ColorIndex = xlNone
   
    Row = Target.Row
    Col = Target.Column
   
    Set RngRow = Range("A" & Row, Target)
    Set RngCol = Range(Cells(1, Col), Target)
    Set RngFinal = Union(RngRow, RngCol)
   
    RngFinal.Interior.ColorIndex = 6







Komentar

Postingan Populer