how to set activecell?

  • Thread starter Thread starter ljb
  • Start date Start date
L

ljb

I have a worksheet_change event function that behaves differently based on a
value typed into a cell verses pasted into a cell. If I paste in a value the
activecell doesn't change. If I type a value and hit enter the activecell
moves down one row. How can I set the activecell to be the one I just moved
from?

thanks
LJB
 
Hi

One brutal way is

Private Sub Worksheet_Change(ByVal Target As Range)
'whetever here, and finally:
Target.Select
End Sub

But whether the cursor moves on Enter or not is really the choice of each user, defined in
the Tools > Options > Edit > Move cursor after entry. And user preferences should in my
opinion be overridden only when absolutely necessary ... that is when the users are idiots
.... which is almost always ...<bg>
 
Thanks, got me going again.

Looking at help I find it suggests using Target.Activate if its a single
cell over Target.Select. Both seem to work for me.

thanks
LJB
 
Back
Top