Event on Range

Right now I have some VB code in a sheet that will change the value in cell B3 when I paste date into cell A11. This will only work if something is pasted only into A11, it will not work if I paste into a range such as A11:G13. I would like to find a way to change this code so that even if I paste into any range that includes cell A11 then cell B3 will be updated. If there is something prohibitive in this request then simplifying the code to update cell B3 when any other cell on the sheet is changed would work fine too.

Thank you for your help.

The code is as follows:

Private Sub Worksheet_Calculate()

    Application.EnableEvents = False

    ActiveSheet.Calculate
    DoEvents

    With Range(“A11”)
        .Value = .Value
        DoEvents
    End With

    Application.EnableEvents = True

End Sub

Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = “$A$11” Then
        Range(“B3″).Value = LastSavedUser() & ” on ” & Date
    End If

End Sub

By: Aaron Glass

Leave a Reply

Your email address will not be published. Required fields are marked *