View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default SheetChange Event

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Target.Font.ColorIndex = 5
End Sub

While sh holds a reference to the sheet where the cell was changed, Target
also contains that information, so no additional code is needed nor is a
separate reference to the sheet needed.

--
Regards,
Tom Ogilvy



"Paul" wrote in message
...
Hi All,

I need a little help with SheetChange Event. What additional code is

needed
to test the following example? I understand code is required that

connects
the sheet name to syntax when placed in the Microsoft Visual Basic tool.
However, I've not been able to determine the code.

Here is the example:

This example changes the color of changed cells to blue.

Private Sub Worksheet_Change(ByVal Target as Range)
Target.Font.ColorIndex = 5
End Sub

I really appreciate you'll assistance.

Thanks
Paul