shading a cell based on another cell with not value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top