View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default shading a cell based on another cell with not value

hi,
not sure exactly but try something like this....

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
ActiveCell.Offset(0, 1).Interior.ColorIndex = 6 'yellow
End Sub

if you are unsure, look up the offset property in vb help.
colorindex...0 = white, 1 = black. play with the numbers until you get your
color.

regards
FSt1

"Tony" wrote:

I'm making an application where the user will tab through cells. Each cell
has a description of that cell beside it in a different cell. How can I
shade the cell with the description when the user tabs into the cell it is
describing, and then have it un-shade when they tab out of it?