ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to change the color of a row using VBA (https://www.excelbanter.com/excel-programming/296901-how-change-color-row-using-vba.html)

george

How to change the color of a row using VBA
 
Hi, thanks for the other help, know I need to see if I can
change the color of a hole row using Excel VBA. I've been
trying to work around the code but it gives me an "Object
Required" Error. thanks in advanced

Ron de Bruin

How to change the color of a row using VBA
 
Hi

This will color the activecell row

Sub test()
Rows(ActiveCell.Row).Interior.ColorIndex = 3
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"George" wrote in message ...
Hi, thanks for the other help, know I need to see if I can
change the color of a hole row using Excel VBA. I've been
trying to work around the code but it gives me an "Object
Required" Error. thanks in advanced




Bob Phillips[_6_]

How to change the color of a row using VBA
 

Range("A1").Entirerow.Interior.ColorIndex = 3

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"George" wrote in message
...
Hi, thanks for the other help, know I need to see if I can
change the color of a hole row using Excel VBA. I've been
trying to work around the code but it gives me an "Object
Required" Error. thanks in advanced





All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com