View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ronald Dodge Ronald Dodge is offline
external usenet poster
 
Posts: 111
Default go back/previous cell

Indirectly, there is a way, though not sure how it would work when you have
multiple cells selected. Check out both SelectionChange and Change events
on both the worksheet and workbook level.

SelectionChange is the event that I have had to use as well as having module
level (or in this case worksheet level) variables setup and they retain
their values so as when the selection of cell(s) has been changed, it knows
what was selected prior to the change.

The Target variable contains the new range/group of cell(s) selected, after
the change took place. I doubt though this event would be triggered if
multiple cells are selected and you just hit the tab or enter key.

At the end of the code, the variables would need to be set to the new
selection so as at the beginning of the code, it can use that selection to
set the focus on via the Select Method, should you want to have it do that.

--
Ronald R. Dodge, Jr.
Production Statistician/Programmer
Master MOUS 2000

"jasminesy" wrote in message
...
is there any way to go back to a previous cell? Say am in a1 and hit

enter
(or tab), is there any way programmibly to get back to the cell (or at

least
get it's address) automatically with out knowing the cells name or

position.