Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to set activecell?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default how to set activecell?

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
--
HTH. Best wishes Harald
Followup to newsgroup only please.

"ljb" <. wrote in message ...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how to set activecell?

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveCell.FormulaR1C1 Rick Excel Discussion (Misc queries) 3 March 28th 10 10:36 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
ActiveCell or ActiveSheet Launchnet Excel Worksheet Functions 1 July 20th 07 07:46 PM
ActiveCell in a Range? Filo Excel Discussion (Misc queries) 3 May 22nd 07 09:52 PM
Activecell problem [email protected] Excel Discussion (Misc queries) 1 October 26th 05 02:13 PM


All times are GMT +1. The time now is 06:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"