View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
excelent excelent is offline
external usenet poster
 
Posts: 695
Default Change text colour of a cell when a different cell is selected

try put in sheet-tab kode-window


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 4 And ActiveCell.Column = 1 Then
Cells(4, 2).Font.ColorIndex = 3
Else
Cells(4, 2).Font.ColorIndex = 1
End If
End Sub



" skrev:

This problem is likely to be very easy for anyone with basic macro
knwoledge.

I need to know how to automatically change the colour of the text in
cell B4 to red everytime cell A4 is selected, then back to black when
cell A4 is unselected. Also, where do I place the code to perform this?

Any help will be much appreciated.