Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default After Enter in a cell

When you have entered numbers or text in a cell, and pres
enter, the cellpointer move up or down, left or right or
nowhere. How can I find out what it does from VBA. What
property do I look for?

Thank you
Lars Kofod
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default After Enter in a cell

If you record a macro it will only give you the address you went to.
If you want to control where it goes in a macro use OFFSET

range("a1").offset(1,4).select


--
Don Guillett
SalesAid Software

"Lars Kofod" wrote in message
...
When you have entered numbers or text in a cell, and pres
enter, the cellpointer move up or down, left or right or
nowhere. How can I find out what it does from VBA. What
property do I look for?

Thank you
Lars Kofod



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default After Enter in a cell

Hi Lars,

The MoveAfterReturn and MoveAfterReturnDirection properties (of the
Application object) will give you what you're looking for:

Public Function gsMoveAfterReturn() As String
If Application.MoveAfterReturn Then
Select Case Application.MoveAfterReturnDirection
Case xlDown
gsMoveAfterReturn = "Down"
Case xlUp
gsMoveAfterReturn = "Up"
Case xlToLeft
gsMoveAfterReturn = "Left"
Case xlToRight
gsMoveAfterReturn = "Right"
End Select
End If
End Function

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Lars Kofod wrote:
When you have entered numbers or text in a cell, and pres
enter, the cellpointer move up or down, left or right or
nowhere. How can I find out what it does from VBA. What
property do I look for?

Thank you
Lars Kofod


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
Vlookup if #N/A then enter enter data in cell I4 duketter Excel Discussion (Misc queries) 3 March 11th 08 09:08 PM
Enter multiple numbers in a cell so total shows when enter keypres newbie Excel Worksheet Functions 2 August 19th 07 12:23 PM
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
How to point to (select) a cell to the left from a cell where I enter the = equal sign? Dmitry Excel Discussion (Misc queries) 4 June 30th 06 06:49 AM
how do I enter a RETURN (Enter) in a cell in EXCEL2003 Micheline Excel Discussion (Misc queries) 5 April 14th 05 10:00 PM


All times are GMT +1. The time now is 09:45 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"