Previous active cell

S

Steven

Is there a way to capture the address of the last previous active cell. I am
trying to do this in the selection change code of a sheet but I cannot make
it work.

Thank you,

Steven
 
D

Don Guillett

See if this helps. Place in worksheet module
Public OldVALUE
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox OldVALUE
OldVALUE = Target
End Sub
 
S

Steven

That is it. I am doing some things in the selection change and now I see
that I have to make that the last line of code in the sub routine so that
when I go to the next cell I am doing the testing before updating the
oldvalue again.

Thank you,

Steven

Thank you for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top