Let's use the idea I proposed. Add the following to a module...
Public InModule As Boolean
Put this procedure in the code window for the worksheet you want this
functionality on...
Private Sub Worksheet_Change(ByVal Target As Range)
If Not InModule Then
Call YourMacro(Target.Row)
End If
InModule = False
End Sub
Here I have assumed your macro is named YourMacro (change it as appropriate)
and I further assumed it will be modified to take one argument, the row
number of the cell just changed by your typing in an entry. To add the
argument to your macro (it will cease to be a macro once you do this;
instead, it will just be a plain subroutine), just create an argument for it
between the parentheses where the macro is declared. For example, if you
current macro is declared like this...
Private Sub MyMacro()
'
' Your code is located here
'
End Sub
then simple make it look like this...
Private Sub MyMacro(CurrentRow As Long)
'
' Your code is located here - wherever you now refer to the row
' for the active cell, just use the CurrentRow argument instead.
'
End Sub
--
Rick (MVP - Excel)
Rick,
Interesting options you brought up to consider, my need is very
simple. See repsonse below.
Do you want the update in Column B to take place automatically as soon as
the cell is
changed or only when you execute a macro manually?
Not automatically, only when the macro is invoked manually.
Are there certain columns that you want to
track (if so, which ones)
No, I just need to identify the row where the last change was made.
And this is all o the same worksheet.
What is the update that you want to perform in Column B?
I have a currently working macro to enter date and some other info.
Right now I manually select the cell so I'm just looking to automate
the process to identify the correct cel to update.