View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ajtb Ajtb is offline
external usenet poster
 
Posts: 41
Default Change Color of Cell

Hi Nigel
This works but needs to be placed in the ThisWorkbook object.



Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
Range("A1:M20").Interior.ColorIndex = 0
Target.Interior.ColorIndex = 7
If Left(Target, 5) = "Sheet" Then Sheets(Target.Value).Activate
End Sub

Regards
Andrew Bourke


Nigel Bennett wrote:
I would like to change the color of the active cell to
a specified color when the focus is in that cell and then
when it moves to another revert to white.

also if the cell has another sheet name in it that when
the user selects that cell the active sheet is changed to
the new sheet