I would like to capture the cell address a user enters data.
I have tried the following:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myRow As Long, myColumn As Long
myRow = Selection.Row
myColumn = Selection.Column
End Sub
This works perfectly if the user enters the value and then presses the <Enter> key.
However if the user enters data and then clicks into a different cell without hitting the <Enter> key, it captures the address of the new cell.
The same issue is present whether I use the Worksheet_Calculate and Worksheet_SelectionChange events.
What I am trying to do is automatically insert a new row immediately below the row the data was entered into (a specific column's data entry). I need to do this because we want to maintain a specific format (also identify the new data range) and users will utilize many different methods of doing this manually. They invariably cause issues with identifying a specific data range or they mess up the format.
I have my routine for inserting a new row, setting the format, and identifying the new data range. I just need to know how to make sure I have the cell the data was actually entered into rather than the new cell if they enter by moving to a new cell.
Bookmarks