ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   cell colour change (https://www.excelbanter.com/excel-worksheet-functions/26284-cell-colour-change.html)

anthony

cell colour change
 
could some one please tell me how in a visual basic macro i can change the
background colour of a cell.



Bob Phillips

activecell.interior.colorindex = 3

sets it to red

--
HTH

Bob Phillips

"anthony" wrote in message
...
could some one please tell me how in a visual basic macro i can change the
background colour of a cell.





Sunil Jayakumar

Hi Anthony,

You can try:

ActiveCell.Interior.ColorIndex = x

where x is the colour reference (6 is yellow)

Hope this helps

Warm regards

Sunil Jayakumar

"anthony" wrote in message
...
could some one please tell me how in a visual basic macro i can change the
background colour of a cell.



www.ayyoo.com/credit-cards.html




All times are GMT +1. The time now is 12:40 AM.

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