Setting the BackColor of a cell in code

  • Thread starter Thread starter DoctorV
  • Start date Start date
D

DoctorV

I have code on a button that changes a data entry cell to locked but
cannot seem to change its BackColor Below is the code for locking it.
What do Ineed to do to change the BackColor to Gray

Sheets("Level 2 Support Team Member").Range("b10").Locked = True

When I tried to do
Sheets("Level 2 Support Team Member").Range("b10").backcolor=gray o
the number for the color gray it won't work

Thank
 
..backcolor is not a property of the range object.

Try:

Sheets("Level 2 Support Team Member").Range( _
"B10").Interior.ColorIndex = 15
 
Thanks a lot JE I did not know that it was Interior.Color I always us
Access and thnk in terms of BackColo
 
Back
Top