Hi!
How do i go about having the following code automatically inserted into my worksheet? I've written a macro to format a spreadsheet and I want to highlight any changes that are made to cells by a user after the report is distributed. I don't want it to activate the change event until the very end of the macro though (sorry, i'm a newbie) or else it will highlight all the formatting changes. I need to run this on 100+ reports and don't want to have to insert the worksheet_change to every single one!
Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "A1:P2999" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target .Interior.ColorIndex = 6 End With End If ws_exit: Application.EnableEvents = True End Sub
Bookmarks