LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selection the previously selected cell

I would like to know how to select the previously selected
cell in Excel using VBA code.

I am using the Worksheet_Change event to validate values
entered, using IF statements in VBA.

This works fine as long as the value is entered using the
enter key, as the active cell does not change. However,
if a value is entered using any of the arrow keys, the
active cell changes and the wrong cell is validated!

When the Worksheet_Change event is triggered I want to be
able to return to the cell into which the value has been
entered, regardless of which key has been used to enter
it. I still want to be able to use the arrow keys to move
about the worksheet.

Can anyone help?
 
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
How do I edit directly in a cell - previously F2 Pweter Excel Discussion (Misc queries) 2 February 18th 10 11:14 AM
Getting rid of previously typed data from a cell Amste Excel Discussion (Misc queries) 4 January 25th 06 02:01 PM
Lookup Oldest date from previously selected Group Data Jim May Excel Worksheet Functions 8 May 14th 05 07:29 PM
Selection.End(xlDown) with Rows selected Tokash Excel Programming 1 August 19th 03 03:52 PM
Selection.End(xlDown) with Rows selected norman Excel Programming 0 August 19th 03 01:45 AM


All times are GMT +1. The time now is 12:59 AM.

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

About Us

"It's about Microsoft Excel"