Workbook code vs worksheet code
Dean,
With events that are built-in to the object in Excel or those you define,
you will find it more reliable to get VBA to generate the stubs for you,
thereby guaranteeing that the signature, arguments etc are correct.
In the WS module that you wish to add the code, go to the top-left combo box
and select "WorkSheet". Then in the top-right combo box, select the event
you want, in this case "Change".
Now add your desired code in the routine.
NickHK
wrote in message
ups.com...
Hi-This code works when in This Workbook section for code but I want
to have it work in one worksheet only. I tried just copying the code
the the specifc worksheet. Didn't work. What do I change?
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Target.Interior.Color = vbRed
End Sub
|