Tuesday, May 5, 2026

How to copy active cell in excel - VBA - How to copy and fill color of row in excel- VBA -Macro

ActiveCell.Copy

or

 Sub Macro1()

ActiveCell.Copy

ActiveCell.EntireRow.Interior.Color = 5296274

End Sub


or

 Sub Macro1()

ActiveCell.Copy

With ActiveCell.Row.Interior

        .Pattern = xlSolid

        .PatternColorIndex = xlAutomatic

        .Color = 5287936

        .TintAndShade = 0

        .PatternTintAndShade = 0

    End With

End Sub


ref:- https://www.mrexcel.com/board/threads/vba-command-for-copying-active-cell-content-only.978747/

https://www.reddit.com/r/excel/comments/axgoth/vba_code_to_color_a_row_whole_up_until_a_certain/



No comments:

Post a Comment