I need the module to Return the address of a modified cell even when pressing Intro without rng.offset(-1,).
When a cell is modified. The module is returning the value of the cell below and not the cell that was modified. Is there a way to return the value of the cell modified before it moves down?
This is what I am doing:
Public xTab As Worksheet
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set xTab = ThisWorkbook.Worksheets("Report")
Set rng = ActiveCell
If Not Intersect(Target, xTab.Range("A:A")) Is Nothing And Selection.Count = 1 Then
Debug.Print rng.Value
End If
End sub
If I modify cell: A2 and press intro. it will return the value of A3 instead of A2.
Is there a way to avoid this WITHOUT using rng.offset(-1,)?
Thank you!
Manuel Mojica is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.